Re: [Gc] Re: Partially scanning a VM's call stack

Ivan Maidanski ivmai at
Tue Aug 18 09:00:47 PDT 2009


ludo at (Ludovic CourtХs) wrote:
> Hi Ivan,
> Ivan Maidanski <ivmai at> writes:
> > If staxk grows up: use GCJ length-based descriptor (in this case it should be VM "stack" pointer).
> I'm not sure what you mean.  Can you be more specific?

Do you know the VM stack direction? Typically most stacks grow down, but if this is an outstanding case then:
Allocate the VM thead stack using GC_GCJ_MALLOC(sizeof(word)+stack_size, &descr), where descr is of type struct { some_word; word stack_top; }, where stack_top is adjusted on every push/pop (initially stack_top = sizeof(word) | GC_DS_LENGTH, i.e. stack is empty).

> > Other possible solution (including stack grows down): GC_DS_PROC.
> Oh, right (I actually already use it to provide a compatibility layer
> with Guile's custom mark procedures.)
> Thanks!
> Ludo'.

More information about the Gc mailing list