[gclist] Precise GC's performance

Darius Blasband darius@phidani.be
Sat, 9 Mar 1996 14:56:59 +0100 (MET)


> 
> Obviously, you're the expert here, but why not just add a bit to
> objects with finalizers?  The bit would mean, "finalizer must be
> called".  If the bit is *on*, a collection would cause the object's
> finalizer to be called, and the bit flipped *off*.  Then, instead of
> having a second pass, just wait for the next collection.  If the bit
> is *off* during a collection, the object is just collected as normal
> (no call to the finalizer).  To handle the "rescue from deallocation",
> if such an object is reachable in a collection, the bit is always
> turned back *on*.
> 
> I don't know enough of the details of the collector to know if this is
> definately doable this way, but it seems so.
> 
> John Jannotti
> 
You are entirely right, or at least, I see no problem with your
approach. I'll try it, and keep you (I mean, the entire mailing
list) informed. I do have spare bits in the object headers, so
I can implement this scheme quite easily.

Regards (and thanks)

Darius