[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: GC "survey"
- From: "Thatcher Ulrich" <tu@...>
- Date: Sat, 24 Aug 2002 12:03:13 -0400
On Aug 24, 2002 at 12:56 +0800, paul@theV.net wrote:
> On Sat, Aug 24, 2002 at 12:40:57AM -0400, Thatcher Ulrich wrote:
> > paul@theV.net posted a while back about an experimental incremental GC
> > patch he made, but the link seems to be dead. Paul, what's the status
> > of that?
> The link'd gone dead a few months back when I went for vacation. It
> has been up and running after I returned :-P
I took a quick look through the diff -- it looks promising. I think
the size of the collection data within objects can be condensed to
just two pointers (one of which replaces the existing "mark"
pointer). The idea is to keep separate lists for each type of object
(thus eliminating the vtype variable) and not storing an explicit
"marked" value -- instead, the marked status is determined by which
list the object is linked into (white, gray, or black).
Hopefully I will get a chance to fiddle around with this in the near
future. I think the first task is to make a "luaC_checkinvariants()"
function, which does an expensive traversal of everything and ensures
that the GC state is consistent. This would be used only for
debugging. Then, assemble a test suite and run it, calling
luaC_checkinvariants very frequently. Hopefully this will smoke out
any missing write barriers.
Thanks for posting your stuff!