[Haskell-cafe] Sometimes pinned memory?
dons at galois.com
Wed Nov 11 16:18:49 EST 2009
> Hey everyone! Do you have any suggestions for how I might allocate an
> aligned block of memory that I can pin while making foreign calls, but
> leave unpinned the rest of the time to potentially improve allocation
> and garbage collector performance? Or is this even a good idea?
There's no pinned/unpinned memory. You have to pick one.
* Use a ForeignPtr to allocate pinned memory (mallocForeignPtr)
if you want it mostly poinned. Otherwise, you'll need to copy from
unpinned to pinned.
More information about the Haskell-Cafe