[Gc] Re: Combining collected and uncollected heaps
J.Wielemaker at vu.nl
Wed Jan 4 05:34:24 PST 2012
On 01/04/2012 11:10 AM, Hans Aberg wrote:
> There is the general problem of combining collected and uncollected
> Objects can be collected and uncollected. Further, pointers can be
> traced and untraced.
I assume you refer to the terms UNCOLLECTABLE and ATOMIC here?
> The objects on the heap that is not collected by the GC should
> initially be marked uncollected. Only pointers to the GC heap should
> be traced.
Not sure I get this. What does `marked uncollected' mean here. In my
view, objects can be under GC, but be marked `permanently' (or
`unmanaged'). Then I distinguish three possibilities for a block: (1)
all objects are managed: do the usual stuff, (2) all objects in the
block are marked unmanaged: simply skip the block for all GC phases and
(3) some blocks are managed, some not. Now, clear_hdr_marks() only
clears the marks on the objects that are managed. As unmanaged objects
are considered marked, they will never be placed on the mark agenda, and
thus not be scanned for pointers.
> When an object expires on the uncollected heap, it should be marked
> for for collection by the GC. It will then stay alive until the GC
> finds it is dead.
I think that is exactly what I propose. What is your `general problem'
At this moment I'm sufficiently confident that this schema can work.
I've restarted work on the whole library under the assumption that the
GC details will be sorted out later. If necessary I can include a
customized copy of BoehmGC, but I very much prefer to avoid that.
Regards --- Jan
More information about the Gc