FFI, safe vs unsafe

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Apr 3 06:20:53 EDT 2006


Hello John,

Monday, April 3, 2006, 12:53:05 PM, you wrote:
>> new stacks can be allocated by alloca() calls. all these
>> alloca-allocated stack segments can be used as pool of stacks assigned
>> to the forked threads. although i don't tried this, my own library
>> also used processor-specific method.

> so you alloca new big areas and then use 'longjmp' to jump back and
> forth within the same stack simulating many stacks?

yes

> that is a neat trick. will confuse the hell out of the bohem garbage
> collector but I don't want to rely on that much longer anyway :)

setjmp/longjmp is not compatible with C++ exception handling (because
stack unwinding will be confused :) ). may be this GC also don't
compatible with setjmp/longjmp in any case?

it will be cool to extend jhc with multi-threading

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-prime mailing list