[Gc] pthreads and libgc
wingo at pobox.com
Fri Mar 25 06:48:11 PST 2011
On Sun 20 Mar 2011 11:45, Ivan Maidanski <ivmai at mail.ru> writes:
> If you already care about threads registering then you can compile your
> app with -D GC_NO_THREAD_REDIRECTS (thus avoiding GC initialization in
> response to a pthread_create).
Thanks for the pointer. We were mistakenly redirecting pthread
functions not only in libguile, but also for our users. I have fixed
that, and that helps this issue.
In addition, we were not calling GC_allow_register_threads(). I changed
to do so, and now the code in the original report (both with and without
GC_INIT in the main thread) works.
However it is now leaking memory. I cannot reproduce the issue with
just libgc though, so it must be a Guile problem.
Thanks for the help!
More information about the Gc