Re: Fwd: [Gc] Boehm GC and static library
ivmai at mail.ru
Tue Jan 4 01:15:03 PST 2011
AICS, the problem was in that the client hasn't defined GC_THREADS (before gc.h inclussion).
Mon, 3 Jan 2011 21:37:38 +0000 "Boehm, Hans" <hans.boehm at hp.com>:
> Forwarding, since I'm not currently in a position to approve this.
> From: Scott [mailto:theerickson at gmail.com]
> Sent: Monday, January 03, 2011 12:36 PM
> To: Bruce Hoult
> Cc: Randy Buck; gc at linux.hpl.hp.com
> Subject: Re: [Gc] Boehm GC and static library
> The issue was resolved. #define GC_THREADS was mistakenly omitted. Thanks for replying Bruce!
> On Tue, Dec 28, 2010 at 9:45 PM, Bruce Hoult <bruce at hoult.org> wrote:
> On Fri, Dec 24, 2010 at 5:59 AM, Randy Buck <sutekistudent at gmail.com> wrote:
> > I am having difficulty getting the Boehm GC to work with a static library.
> > I get the following error: "Collecting from unknown thread."
> > The static library creates a thread and listens for UDP packets coming into
> > it. If I do not create this thread, everything works fine, meaning it
> > compiles and runs but doesn't perform the necessary functionality. I am
> > guessing that this is the thread in reference to the above error message.
> > How do I use the GC when I am linking in a static library that creates
> > threads?
> You didn't say what operating system you are on. You may have to call
> GC_register_my_thread() at the start of your thread, something like
> struct GC_stack_base *sb;
> Is someone calling gcinit()?
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc