[kaffe] Threads & Boehm GC

Helmer Krämer hkraemer at freenet.de
Sat Jul 24 03:40:54 PDT 2004


On Sat, 24 Jul 2004 11:59:40 +0200
Guilhem Lavaux <guilhem at kaffe.org> wrote:

> Helmer Krämer wrote:
> 
> >On Sat, 24 Jul 2004 09:38:08 +0200
> >Guilhem Lavaux <guilhem at kaffe.org> wrote:
> >
> >Hi,
> >
> >  
> >
> >>It seems that the Boehm-GC needs to catch a number of pthread calls. 
> >>This is not evident to implement in kaffe but I think I can do the 
> >>following:
> >>[...]
> >>Any comments ?
> >>    
> >>
> >
> >why does the gc_pthread_redirects.h thing from boehm not
> >work? I mean if kaffevm/gc.h included a header file called
> >"gc-impl.h" from kaffevm/kaffe-gc or kaffevm/boehm-gc and
> >unix-pthreads/thread-impl.c included kaffevm/gc.h (and thus
> >boehm-gc/gc-impl.h), it should work, shouldn't it?
> >
> >  
> >
> Yes, but I'd like not to have to include any boehm specific includes in 
> pthreads.
> If I do this, the unix-pthreads will be stuck with the boehm-gc once it 
> is compiled.
>
> If we want to have a '-Xkaffe-gc' to switch to the standard GC we may 
> not be able to do so if we chose this way.

Note that there will be a lot more problems if we wanted to implement
such an option. For example, if you wanted to be able to switch between
an incremental and a conservative GC you would have to modify the vm
itself so it properly tells the gc whenever a pointer is written (or
accept a huge overhead). Therefore, I'd rather select boehm or kaffe
at compile time and have -X options only for options specific to the
selected implementation. Just because it will be easier. Why would one
have to switch between kaffe and boehm at runtime, anyways?

Regards,
Helmer




More information about the kaffe mailing list