WANTED: Docs on Squeak garbage collection algorithms

Peter Crowther peter.crowther at it-iq.com
Mon Mar 15 09:04:02 UTC 1999


I'm currently writing a new chunk of code in the VM to add an optional
fourth 'security' word into all object headers.  It's not going too well; I
hadn't realised little things like forwarding entries re-wrote object
headers with quite such gay abandon, and I have horrible feelings about the
mark phase assuming lots about header formats.

So... does anyone have any docs on the garbage collection scheme employed by
the current ObjectMemory version?  In particular, I'm interested in the mark
state machine (and what it assumes about object headers) and the truth or
otherwise of my guess that during the sweep phase all forward entries have
the Mark bit set.  The code is sparsely commented for anyone who hasn't had
to write/debug GC algorithms before, and I don't think I'll grok the mark
states without external help.

If the docs aren't there, I'd appreciate some comments on where within the
GC there are hardwired constants that speed up the process but break the
rules.  For example, the sweep phase assumes quite a lot about the header
that would normally be accessed by several other methods; I found the code
almost completely by accident.  Any other banana skins out there?

If I find there are no docs, I hereby volunteer to write up the ObjectMemory
object formats and what I understand of the garbage collection algorithms.

All contributions welcome.  Headache tablets also accepted --- I think I'm
going to need them :-).

		- Peter





More information about the Squeak-dev mailing list