[Gc] 7.0 and `GC_REDIRECT_TO_LOCAL'
hans.boehm at hp.com
Mon Oct 22 16:41:05 PDT 2007
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ludovic Courtès
> Sent: Sunday, October 21, 2007 11:48 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] 7.0 and `GC_REDIRECT_TO_LOCAL'
> I'm porting my program, which used GC 6.8, to GC 7.0. To
> ensure thread-local allocation is used, the program did this:
> #define GC_THREADS 1
> #define GC_REDIRECT_TO_LOCAL 1
> In <gc/gc.h> in GC 7.0, defining `GC_REDIRECT_TO_LOCAL' leads
> to the inclusion of "gc_local_alloc.h":
> #if defined(GC_REDIRECT_TO_LOCAL) && !defined(GC_LOCAL_ALLOC_H)
> # include "gc_local_alloc.h"
> However, "gc_local_alloc.h" is no longer exists. Thus,
> shouldn't these three lines above be removed from "gc.h"?
Basically, yes. I now fixed it in my tree. Thanks.
> Also, my understanding of the announcement of GC 7.0 (message ID:
> <468A7997.5080103 at wbemsolutions.com>) is that users no longer
> need to define `GC_REDIRECT_TO_LOCAL' to use thread-local
> allocation, which means that thread-local allocation is
> available "by default" in multi-threaded builds. Is this correct?
Yes. If the collector is built with THREAD_LOCAL_ALLOC, which is
usually the default for autoconf-based builds, GC_malloc now ends
up being the thread-local allocation function.
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc