[Gc] Re: Example segfault with GC 7.1

Hans Aberg haberg-1 at telia.com
Tue Jan 18 23:33:43 PST 2011

On 18 Jan 2011, at 14:15, Hans Aberg wrote:

> The attached example segfaults for some reason when using  
> gc_allocator with std::string; works fine using traceable_allocator.  
> The example is a modification of
> http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_alloc_exC.txt

The example does not call GC_init(), which is required on Mac OS X;  
add that at the beginning of main(), and it works fine. It is also  
amiss in the original (not needed on GNU/Linux OS).

More information about the Gc mailing list