[Gc] Re: Troubles with the mark API

Ludovic Courtès ludo at gnu.org
Fri Oct 31 12:53:04 PST 2008


ludo at gnu.org (Ludovic Courtès) writes:

> For compatibility purposes, my Guile port to libgc makes use of the
> "gc_mark.h" API.  When building libgc with assertions, the program
> quickly hits the following assertion:
>
>   #4  0xb7e0442d in GC_reclaim_generic (hbp=0x81bc000, hhdr=0x8099500, sz=16, init=0, list=0x0, count=0xb7e1108c) at reclaim.c:225
>   225           GC_ASSERT((hhdr)->hb_descr == 0 /* Pointer-free block */);

Shouldn't have spoken too fast.

In the meantime, I tried passing 1 instead of 0 as the CLEAR_NEW_OBJECTS
argument to `GC_new_kind ()', which makes the problem vanish (this was
suggested in this post:
http://osdir.com/ml/programming.garbage-collection.boehmgc/2006-10/msg00011.html).

I see that all calls to `GC_new_kind_inner ()' in libgc itself pass 1 as
CLEAR_NEW_OBJECTS.  Is it just that CLEAR_NEW_OBJECTS == 0 should always
be avoided?

Thanks,
Ludo'.



More information about the Gc mailing list