From: Andy Wingo <wingo@pobox.com>
To: Ivan Maidanski <ivmai@mail.ru>
Cc: bug-guile <bug-guile@gnu.org>, gc@linux.hpl.hp.com
Subject: Re: [Gc] pthreads and libgc
Date: Fri, 25 Mar 2011 15:48:11 +0100 [thread overview]
Message-ID: <m3pqpfgst0.fsf@unquote.localdomain> (raw)
In-Reply-To: <E1Q1G8G-0005an-00.ivmai-mail-ru@f185.mail.ru> (Ivan Maidanski's message of "Sun, 20 Mar 2011 13:45:12 +0300")
Greets,
On Sun 20 Mar 2011 11:45, Ivan Maidanski <ivmai@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!
Andy
--
http://wingolog.org/
prev parent reply other threads:[~2011-03-25 14:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 20:56 pthreads and libgc Andy Wingo
[not found] ` <m37hbwxi57.fsf-CaTCM8lwFkgB9AHHLWeGtNQXobZC6xk2@public.gmane.org>
2011-03-19 19:18 ` Ivan Maidanski
2011-03-19 23:26 ` [Gc] " Andy Wingo
[not found] ` <m3zkoqvgis.fsf-CaTCM8lwFkgB9AHHLWeGtNQXobZC6xk2@public.gmane.org>
2011-03-20 3:51 ` Boehm, Hans
2011-03-21 9:29 ` Ludovic Courtès
2011-03-25 14:49 ` [Gc] " Andy Wingo
2011-04-15 21:35 ` Calling ‘GC_INIT’ from a secondary thread Ludovic Courtès
2011-04-16 9:38 ` [Gc] Calling ‘GC_INIT’from " Ivan Maidanski
2011-04-17 14:01 ` Ludovic Courtès
2011-04-17 14:11 ` Re[2]: [Gc] Calling ‘GC_INIT’ from " Ivan Maidanski
2011-04-17 19:49 ` Ludovic Courtès
2011-04-18 22:18 ` Re[2]: [Gc] Calling ‘GC_INIT’ from a secondarythread Ivan Maidanski
2011-03-20 10:45 ` Re[2]: pthreads and libgc Ivan Maidanski
2011-03-25 14:48 ` Andy Wingo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3pqpfgst0.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=bug-guile@gnu.org \
--cc=gc@linux.hpl.hp.com \
--cc=ivmai@mail.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).