[D-runtime] D Concurrent GC

Sean Kelly sean at invisibleduck.org
Thu Sep 23 12:54:54 PDT 2010


On Sep 21, 2010, at 8:02 AM, Leandro Lucarella wrote:

> On Wed, Sep 15, 2010 at 4:04 PM, Sean Kelly <sean at invisibleduck.org> wrote:
>> Here's a quick and dirty port of the GC to druntime.  I've included a new posix.mak (as posix.mak.new) and the code itself in gcnew/.  What I did was rename src/gc to src/gcbase and create a symbolic link from src/gc to src/gcnew.  Then build with posix.mak.new, etc.  I marked most changes with TODO or BUG, but the pertinent bits were that I added gc_qalloc() and commented out the PointerMap stuff.  I haven't done more than verify that the GC works for some unittests so I'd love to see some more thorough testing.  Porting to Windows may be a bit more involved because I believe I saw a posix header imported somewhere that isn't inside a version(Posix) block.
> 
> I'm very glad that you're interested in porting the concurrent GC to
> Druntime. I'm sorry I just saw this, but I don't have internet at home
> since about a week and my main e-mail account was hosted there.
> 
> It's very likely that the posix.mak (and any other Makefile is
> outdated because I'm using a Makefile for building the GC as part of
> Tango, so I don't use the makefiles in the cdgc repository since ages
> ago.
> 
> I was careful to try to keep Windows working (or at least compiling)
> but didn't *ever* tried (not even to compile it), so yes, you probably
> should expect some problems, but hopefully just not fundamental,
> aesthetic problems.

No worries... it should be an easy fix if any compile errors occur.

So what's the deal with PointerMap?  I couldn't find a definition in the GC code, nor in the few obvious places I checked in Tango (ie. object.d).  Are you working from a local branch where this patch is applied?  Also, any chance you'll give D2 a try?


More information about the D-runtime mailing list