[Gc] gc on windows
hans.boehm at hp.com
Fri Aug 14 13:01:38 PDT 2009
Adding to Ivan's answer:
There are a handful of platforms on which it actually matters that GC_INIT is called from the main program because it expands into something that includes symbol references that won't have the right definition in a dynamic library. I believe that this currently only matters for Cygwin and AIX.
On other platforms it's fine to call it from a dll or equivalent. But that means that maximally portable code should call it from the main program.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Jack Andrews
> Sent: Thursday, August 13, 2009 10:12 PM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] gc on windows
> i just read
> On some other platforms it is necessary to call GC_INIT()
> from the main program, which is presumed to be part of the
> main executable, not a dynamic library. This can never hurt,
> and is thus generally good practice.
> so my dll shouldn't call GC_INIT()? can't i have an ini()
> function that the main program calls and in the ini()
> function, i call GC_INIT()? the host is C#/.NET and my dll is in c.
> ta, jack
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc