_Jv_HashCode

Jeff Sturm jeff.sturm@appnet.com
Wed May 10 09:21:00 GMT 2000


Tom Tromey wrote:
>> >>>>> "Jeff" == Jeff Sturm <jeff.sturm@appnet.com> writes:
>> Jeff> It seems to me that synchronization objects could provide their
> Jeff> own hash algorithm as well.
>> What could it be except object address? It has to be something that
> never changes, regardless of the object's contents. Also, we don't
> want to add an extra word to the object, because getting rid of a word
> is one point of making this change.

Like you said, the bottom 2 or 3 bits of the address are useless, so you
can shift right.
Perhaps _Jv_HashCode should be changed to do the same after all, if gdb
can be fixed. On 64-bit archs that could shift in some meaningful bits
too.
-- 
Jeff Sturm
jeff.sturm@appnet.com


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /