Allocation & Marshalling Question (again)

Adrian Hey ahey at iee.org
Thu May 29 06:20:44 EDT 2003


On Wednesday 28 May 2003 10:32, Simon Marlow wrote:

> Even in GHC where we use garbage collected memory instead of malloc, we
> still make use of the IO monad to control the lifetime of the allocated
> memory.

Thanks for that info. I'm not to clear about what the intended implementation
is (if there is one) from reading the FFI spec. It seems to me that if the
IO monad is used to control the lifetime you could use stack allocation quite
easily. (Dunno if that would be any more efficient for the ghc rts though.)
Using the garbage collected heap but not actually using normal garbage
collection mechanisms seems a bit strange to me :-)

Regards
--
Adrian Hey 




More information about the FFI mailing list