[gclist] object identity & copying collection

David Chase chase@world.std.com
Wed, 10 Dec 1997 10:37:59 -0500


At 09:20 AM 12/10/97 -0600, Charles Fiterman wrote:
>The problem is in the object identity not the hash function.

[...]

>This suggests deep problems with copying collectors
>and object orientation.

Why?  Identity is simply not-being-equal-to anything
else.  Copying collectors preserve that relationship
among all accessible objects.  If you are referring to
external identity, copying collectors are no worse
off than existing collectors, because non-moved objects
will also require unique IDs; the address allocated in
a given machine is not unique in time, and publishing
that address (while still allowing collection of the
object) can result in "mistaken identity" in the future.

The 2-bit solution describe for hashCodes can also be used
for object IDs, though the values can be assigned differently:

00 - no ID allocated.
01 - ID found in hash table, indexed by current address.
10 - ID follows object.

This problem doesn't look very deep to me.

David Chase
chase@world.std.com