texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] Boehm-gc-texmacs gc behavior (was: Re: Boehm-gc-texmac


From: Joris van der Hoeven
Subject: Re: [Texmacs-dev] Boehm-gc-texmacs gc behavior (was: Re: Boehm-gc-texmacs cache behavior)
Date: Mon, 24 May 2004 17:50:12 +0200 (CEST)

I am wondering again about how to implement incremental garbage
collection, so I read Boehm's page on the subject. I do not understand
how the following situation is treated:

Imagine that we have two root objects (e.g. in static memory) a and b,
pointing to trees t and u. At the start, no objects are marked:

        a(0)  -->  t(0)
        ...
        b(0)  -->  u(0)

We now perform a small incremental garbage collection by marking
the objects which can be reached from a:

        a(1)  -->  t(1)
        ...
        b(0)  -->  u(0)

Before we do a second incremental garbage collection, our vicious
program swaps the pointers a and b:

        a(1)  -->  u(0)
        ...
        b(0)  -->  t(1)

When resuming the garbage collection, we mark the objects accessible
from b:

        a(1)  -->  u(0)
        ...
        b(1)  -->  t(1)

This leaves us with the unpleasant situation that u is not marked,
although it is accessible. It is not clear to me how Boehm deals
with this situation. Any ideas?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]