Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do JVMs implement IdentityHashMap?

Specifically when they're used with a moving garbage collectors. The current memory location of the object can't be used because it can change at the next collection, so what is used as the objects hash?

like image 298
Alex Gaynor Avatar asked Jun 27 '11 01:06

Alex Gaynor


1 Answers

Hope this question helps: How does the JVM ensure that System.identityHashCode() will never change?

Also http://xiao-feng.blogspot.com/2007/04/object-hashcode-implementation.html

like image 190
ata Avatar answered Sep 23 '22 17:09

ata