Steps to Modularity - Incremental Snapshots

jecel at lsi.usp.br jecel at lsi.usp.br
Fri Mar 26 19:06:02 UTC 1999


Congratulations Dan and Ted!! I have always felt that the monolithic
image has been the number one reason why Smalltalk has failed to
reach the masses (and Java just reinforced this idea).

I would just like to comment that "single root" segments worry me
somewhat. It is nearly impossible to avoid the "leaking of internal
pointers" unless you limit very strictly how segments may be used.
If you have a whole bunch of objects that are pointed to from the
rest of the image via a single local root object, all it takes is
one message to that root that causes it to return a pointer to
one of its children and having that pointer stored in an instance
variable of a non-segment object to ruin the single rooted structure:

    myInstVariable := singleRoot children first.

If a little care is taken in synchronizing the GC, then storing that
internal pointer in a temporary variable won't cause the same problem.

The write barrier in the GC (ObjectMemory>>storePointer:intoObject:
withValue:) could be patched to detect this internal pointer leak,
but doing so effeciently wouldn't be easy at all.

-- Jecel





More information about the Squeak-dev mailing list