Object ID's

P T Withington ptw at pobox.com
Wed Mar 21 09:30:27 PDT 2007

In the copying collectors I know of, where hashcode is based on  
location, hashtables get rehashed on the first access after a gc that  
may have moved objects in the table.  There are lots of tricks for  
minimizing the rehashes.  (Ask for details if you want.)  OTOH, I am  
pretty sure that the Java copying collectors rely on the hash/object- 
id being stored in the object.

On 2007-03-21, at 12:11 EDT, Igor Bukanov wrote:

> I have a question about feasibility to implement intrinsic::hashcode
> (even with collisions) efficiently in an implementation with a copy GC
> collector. For me at seems that it would require to put an id in each
> and every object to ensure that the hashcode stays the same during the
>  lifetime of the object. Or there is some trick to avoid that?
> On the other hand Dictionary can be implemented efficiently even if GC
> moves objects since GC can rehash the table.
> Regards, Igor
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss

More information about the Es4-discuss mailing list