Simon Marlow wrote:
> Manuel M. T. Chakravarty wrote:
> [...] we should really enforce a stack discipline and use a wrapper
> > function:
> > alloca :: Int -> (Addr -> IO a) -> IO a
>
> Nice idea. I'm not sure about the implementation though: did you
> have in mind using C's malloc/free?
Perh
> I completely agree. Why not drop passing
> (Mutable)ByteArrays to foreign functions altogether - if a
> program wants to pass Haskell data to C land, the Right
> Thing is to use a StablePtr.
Agreed, if the call can re-enter the RTS.
> Now there maybe efficiency
> considerations when using t