I'm trying to modify the LargeObjectSpace so that some (user
selected) objects will always be treated as marked.
From looking at the code, I'm not sure I have a complete
understanding of how the LargeObjectSpace actually works. It seems like, as
the collector traverse, object references are copied from one list to
another. Then, after traversing all the live objects, any remaining objects
in the from list are released during the RELEASE phase.
So, if I want to ensure my user selected objects are not released, I
need only ensure that they (their addresses) are always added to the to the
closure of live objects is complete.
Am I missing anything here? I see lots of mention of a "nursery" in
the code, but I'm not sure what is being referred to (not the nursery in a
generational garbage collector?).
Thanks for any help,
Dear Nathan -- IIRC, the standard large object space (LOS) in Jikes RVM
employs the Treadmill approach, described some time ago in a paper by
Henry Baker. It maintains a number of lists that place the objects
into different *logical* spaces, and can even represent multiple generations.
Thus it could well be that a particular design has a nursery list for
newly created LOS objects. There will certainly be at least one
from-space and one to-space. To consider certain objects to be "marked",
it should work just to move them to the appropriate to-space list.
The lists are all doubly-linked to facilitate easy movement of individual
objects from list to list.
Regards -- Eliot