Hi. ImageSegment uses GC to compute the out pointers. Basically, to a given
array of roots (a graph) it does:
1) It marks the rootArray and all root objects by turning on the Garbage
Collector bit in the object header of those particular objects.
2) Then does a mark pass over all objects. This will stop at our marked
roots leaving our segment unmarked in their shadow.
3) Finally, it unmarks the rootArray and all root objects.
4) Only external objects are now marked.
The unmarked objects in the graph of objects of the arrays are those who
will be put in the WordArray (the segment) and those who are marked to the
outPointers.
However, I don't see where step 2) is done in Interpreter >>
primitiveStoreImageSegment
In a piece of such method it does:
"Then do a mark pass over all objects. This will stop at our marked roots,
thus leaving our segment unmarked in their shadow."
savedYoungStart := youngStart.
youngStart := self startOfMemory. "process all of memory"
"clear the recycled context lists"
freeContexts := NilContext.
freeLargeContexts := NilContext.
self markAndTraceInterpreterOops. "and special objects array"
youngStart := savedYoungStart.
"Finally unmark the rootArray and all root objects."
self longAt: arrayOfRoots put: ((self longAt: arrayOfRoots) bitAnd:
AllButMarkBit).
......continue.......
But here I see it is only marking Interpreter oops, not all objects. And I
don't see where all objects are marked even in the code that follows this
little piece.
You can see the comment: "Then do a mark pass over all objects" and even
without the comment it makes sense to mark all objects in order to detect
outPointers.
Does anyone has a hint?
Thanks
Mariano
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project