mallocForeignPtr vs. C
Evan Laforge
qdunkan at gmail.com
Tue Jul 13 00:49:56 EDT 2010
On Mon, Jul 12, 2010 at 6:54 PM, John Meacham <john at repetae.net> wrote:
> Hi, is a StablePtr what you are after?
Indeed, it looks like StablePtr will get me what I want. It's a
little less convenient than FunPtr because I'm already doing some
finalization of FunPtrs and I can reuse the same callback, but it
looks like it's specifically documented to do what I want, which is
reassuring.
In any case, memcpy still wins out on simplicity. If I ever need to
pass a pointer larger than 32mb and have both haskell and C manage the
memory, I'll look into StablePtr.
More information about the Glasgow-haskell-users
mailing list