[Gc] Coroutines and the GC
Hans.Boehm at hp.com
Sun Nov 27 22:47:15 PST 2005
The most correct way is probably to treat this as a simple port to a new
You could alternatively use the existing (poorly documented) hooks to
supply a custom mark procedure for the stacks. You would probably want to
use GC_new_kind, GC_new_freelist and GC_new_proc from gc_mark.h to
initialize a mew object kind, and then allocate with GC_generic_malloc.
The implementation of the typed allocation calls uses these, and might
serve as a prototype. Note that the standard way to do this results in
stacks being treated as ordinary data areas, i.e. interior pointers are
recognized only of GC_all_interior_pointers is set, as it is by default.
On Mon, 28 Nov 2005, Lothar Scholz wrote:
> I want to use a lot of coroutines. If i allocate the stack with
> se_malloc i don't see a problem. But i would like to optimize this a
> little bit and only force the garbage collector to check the used
> stack space. Is there any way i could do this (which includes patching
> the source code as i think this there is nothing like this alreaday
> implemented). Where should i start to looking ?
> Best regards,
> Lothar Scholz mailto:scholz at scriptolutions.com
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc