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

James Williams junk at giantblob.com
Sun Aug 2 13:22:08 PDT 2009

> 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...
> 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

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.

-- James
>> Should I expect this to work? Would I be better using typed malloc or a
>> custom
>> mark function?
>> Any advice gratefully received, thanks,
>> -- James Williams
> Bye.

More information about the Gc mailing list