[Gc] GC and Coroutines

Basile Starynkevitch basile at starynkevitch.net
Tue Jan 28 07:47:42 PST 2014


On Tue, 2014-01-28 at 10:12 -0300, Juan Wajnerman wrote:
> I'm trying to use the GC together with this coroutine
> library: http://xmailserver.org/pcl.html
> But when the GC tries to free some memory running inside a coroutine
> it crashes.
> I guess the problem happens because other coroutine stacks are
> inaccessible during coroutine execution but I don't know how to fix
> this.
> Does anyone have some tips or tell me at least how could I debug this
> issue?


You probably should use the struct GC_stack_base (probably in the first
routine passed to co_create ...) and use GC_call_with_stack_base
there


Hope that this helps! Please tell us if it does (I am not sure at all)!

Cheers.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***




More information about the Gc mailing list