GDC 4.8: Status of garbage collection and TLS

Dan Olson zans.is.for.cans at yahoo.com
Sat Nov 10 13:54:48 PST 2012


Johannes Pfau <nospam at example.com> writes:
>
> Yes. The GC needs special runtime / compiler support to scan TLS
> variables and this code has traditionally been buggy / difficult to
> implement.
>
> You can use a simple test to detect the most obvious errors:

I used your test, but had to make a bunch of objects to get collection
to happen.  GC *is* reclaiming objects still referenced by TLS and no-TLS
(shared).  So I will need to look into that some more.

Note: this is on osx and I tweaked some of the druntime code to get it
to build, so some of this might be my doing.

So I guess as a follow up, should I expect the GC to be aware of shared
globals, or are there issues there too like thread local?


More information about the D.gnu mailing list