Sorting on Oops

Anthony Hannan ajh18 at
Sat Jun 30 17:30:50 UTC 2001

Is it true that objects in memory never change relative position?  The
garbage collector only slides objects and never swaps them.  If this
characteristic is likely to remain.  I would like to surface the oops in the
image so we can sort objects by them and do binary searches on them.  I find
this useful for creating a LargeIdentityDictionary that has a hash table of
4096 entries (exhausting the 12 bits of identity hash) with buckets in each
entry that hold its elements in sorted oop order.  The objects in the
buckets can then be search using binary search on their oops.
What do you think?

More information about the Squeak-dev mailing list