[Gc] Re: Combining collected and uncollected heaps

Hans Aberg haberg-1 at telia.com
Wed Jan 4 05:59:35 PST 2012

On 4 Jan 2012, at 14:34, Jan Wielemaker wrote:

>> There is the general problem of combining collected and uncollected
>> heaps.
>> Objects can be collected and uncollected. Further, pointers can be
>> traced and untraced.
> I assume you refer to the terms UNCOLLECTABLE and ATOMIC here?

My description may or may not exactly match the current GC features; whence the general formulation.

>> 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.

What seems lacking in the GC interface is the ability to dynamically change the status.

>> 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'
> with this?

My impressions is that you want rather intrusively write your own GC collector, tailored to your specific implementation. I'm not sure if my description would fit your ideas.


More information about the Gc mailing list