_Jv_HashCode
Tom Tromey
tromey@cygnus.com
Wed May 10 08:19:00 GMT 2000
Per> If you change _Jv_Hash so that System.identityHashCode(OBJ) is
Per> no longer equals to (jint)(OBJ) then the gdb output syntax
Per> probably no longer makes sense.
I'm not too concerned about that. Does anybody rely on the fact that
these two are equivalent? Maybe I'm unusual in that it never occurs
to me to exploit, or even remember, that information.
Per> But the interned string hash table isn't using _Jv_Hash I trust?
Per> It is presumably hashing on the *contents* of the string, not its
Per> location.
Oops, you're right. But it will come up in another situation, if I
add a hash table to keep synchronization objects. I guess I can
always make a hash table which isn't a power of 2.
T
More information about the Java
mailing list