From: Alexandre Oliva (oliva@dcc.unicamp.br)
Date: Wed Feb 03 1999 - 13:52:06 EST
On Feb 3, 1999, Godmar Back <gback@cs.utah.edu> wrote:
>> Once we start using moving collectors, we'll have to hack
>> Object.hashCode() (and identityHashCode) so that they keep returning
>> the same value even after the object moves. The hashcode of an object
>> cannot change during its lifetime (and I'm not sure it should change
>> after WriteObject | ReadObject)
> As an aside, this is why EF stores the hashcode in the object.
> Another 4 bytes per object gone.
If the mover is smart, it can store the hashCode out of band, i.e.,
before the beginning of the object, only after it has moved. It could
use one bit of the gc structure to mark whether it has moved, and use
the address or the out-of-band hashCode as appropriate.
-- Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org} oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org} Universidade Estadual de Campinas, SP, Brasil
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:56 EDT