[Gc] Re: GCJ, typed malloc, custom mark proc?

Andrew Haley aph at redhat.com
Mon Aug 3 02:19:48 PDT 2009

James Williams wrote:
>> Hi!
>> James Williams <junk at giantblob.com> wrote:
>>> Hi,
>>> I use Boehm GC as the garbage collector for a compiler and its runtime.
>>> (https://giantblob.com/compiler/)
>>> ...

>>> I've tried using GC_gcj_malloc without success - even if I use
>>> size descriptors that cover the whole object or bitmaps with bits
>>> for all words in the object set the collector still frees
>>> reachable objects. I'm pretty sure my descriptors are right - I'm
>>> basing my code on the fake_vtable structs in tests/test.c and
>>> reading libjava source.

>> Hmm, if I understand correctly you say it's completely broken...

It can't be.  We use it all the time in gcj.

>> I use it (length-based only) for a long period (GC v7.2a2 or CVS) and
>> never observed such things.
>> The ways I use it, I've described in
>> https://permalink.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2679
> Thanks for the pointer.
> I have no reason to think Boehm GC is broken in this instance. I was
> looking for reassurance that the GJC interface to libgc is a supported
> public interface that I can safely use it from outside of the the GCJ
> runtime.
> I think it's most likely that I'm just using GC_gcj_malloc wrongly -
> perhaps my descriptors are in the wrong place or are wrongly constructed.

It should be trivially easy to find out.  What happened when you traced
through the marking routine in a debugger?


More information about the Gc mailing list