[Gc] Win32: DLLs and thread registration
gn at fluidon.dyndns.info
Tue Feb 12 02:45:57 PST 2008
Boehm, Hans wrote:
> I conjecture that if you call GC_INIT
> explicitly, and your collector is built with THREAD_LOCAL_ALLOC
> defined, everything will work correctly.
Since I use 3rd party thread classes I am not able to manually register
all threads myself. That's why have to rely on DllMain registration
which collides with thread local allocation.
> I think the correct (though currently completely untested!) fix is to
> call GC_init_parallel() from the end if GC_use_DllMain().
I did exactly that: I added a call to GC_init_parallel() at the very end
of GC_use_DllMain(). That seems to have fixed all issues and failed
assertions I had so far. I keep you informed if anything goes wrong in
More information about the Gc