[Haskell-cafe] Copying Arrays

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu May 29 15:46:52 EDT 2008

Hello Duncan,

Thursday, May 29, 2008, 10:57:02 PM, you wrote:

> We cannot use memcpy because it operates on raw pointers but that's no
> good for a movable heap object like a ByteArr#.

it's false assumption - memcpy is used for copying non-pinned arrays
as in the code from Data.Array.Base i've citated. the idea is that
GC shouldn't occur between getting array address and actual memcpy
call. you may consult Simon Marlow

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

More information about the Haskell-Cafe mailing list