Startup time, a short review & discussion

Andreas Raab andreas.raab at gmx.de
Sat Aug 2 18:43:25 UTC 2003


> Haven't looked to see how far back this logic goes. Now I 
> wonder when the clear Root bits was added to fix problems
> with RootBits not being cleared correctly after a Full GC.
> Anyone remember? Hint - "adjustAllOopsBy: bytesToShift -> ar 10/7/1998
> - Clear the RootBit of all objects"

Err ... if you have the answer right there, why do you ask? ;-) It's been
added some time around late '98 it seems (probably 2.5 or so).

Oh, and I remember what the real problem used to be and why the above solved
it. If the root bit is already set on an object, it will not be added to the
roots table (see assumption is that if the root bit is set, the object _has_
been added already). However, the roots table happens to be empty upon
startup which means that the active context does NOT get added to roots
table. So if we have a store of a young object into the active context after
the image comes up, the object referenced by the store will not be found
upon GC (due to activeCtx not being in the roots table albeit being marked
root), which leads to horrible crashes. Cleaning up the root bit upon
loading will ensure that #beRootIfOld: really adds the object to the roots
table.

I should add that at the time when I made this fix, I wasn't sure if there
may be any other objects with the root bit set. Even today, I can't say for
sure.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list