large objects and GC

Sean Kelly sean at invisibleduck.org
Sat May 17 12:35:07 PDT 2008


== Quote from Fawzi Mohamed (fmohamed at mac.com)'s article
> On 2008-05-17 10:42:21 +0200, "Vladimir Panteleev"
> <thecybershadow at gmail.com> said:
> > On Sat, 17 May 2008 10:54:06 +0300, Fawzi Mohamed <fmohamed at mac.com> wrote:
> >
> >> Now the pool will stay around as long as any objet into it has references.
> >
> > Heh, no, this is not the case. The GC will track references
> > individually for every object inside the memory pool. The code for
> > freeing sub-pool-size objects is in gcx.d, lines 2056 to 2075.
> Thanks if that is the case then wrapper objects are ok.
> gcx.d, lines 2056 to 2075 of which codebase, where can I get that gcx?
> tango varsion has something else at those lines...

In Tango:

/trunk/lib/gc/basic/gcx.d

In Phobos:

/internal/gc/gcx.d

For what you describe, the easiest thing would be to add a new bitfield
and have an "allow interior pointers" per block, then check this bit during
scanning before flagging a block as reachable.


Sean



More information about the Digitalmars-d mailing list