WANTED: Docs on Squeak garbage collection algorithms

Georg Gollmann georg.gollmann at tuwien.ac.at
Mon Mar 15 09:59:48 UTC 1999


At 9:04 Uhr +0000 15.03.1999, Peter Crowther wrote:
....
>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.

ObjectMemory>isObjectForwarded: oop
	"Return true if the given object has a forwarding table entry during
         a compaction or become operation."

	^ (oop bitAnd: 1) = 0 "(isIntegerObject: oop) not" and:
	   [ ((self longAt: oop) bitAnd: MarkBit) ~= 0 ]

See also ObjectMemory>aComment.

>
>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?

For the few remaining hardcoded constants (mostly harmless) in Squeak 2.3 do

 Smalltalk browseMethodsWithSourceString: '16r'

Most constants are symbolic however so you can use the 'class var refs...'
menu in the browser.

Good luck !
Georg
----
Dipl.Ing. Georg Gollmann                TU-Wien, Zentraler Informatikdienst

phon:(+43-1) 58801 - 42022
fax: (+43-1) 58801 - 42099
mail:gollmann at zid.tuwien.ac.at
http://macos.tuwien.ac.at/Gollmann.html





More information about the Squeak-dev mailing list