George Russell <[EMAIL PROTECTED]> wrote,

> According to section 5.8 of the spec,  MarshalAlloc.free will "free a block
> of memory that was allocated with malloc or mallocBytes".  Fine.  But will it
> also free blocks of memory allocated by MarshalArray.mallocArray and friends?

Yes, `mallocArray' is just a wrapper around `mallocBytes'.

> Come to think of it, what about MarshalArray.reallocBytes?

That can be free'd with `MarshalAlloc.free', too.

> Also, what is
> the "realloc" function mentioned in the specification of reallocArray, or do you
> mean reallocBytes?

Yes, `rallocBytes' is meant, but thinking about it, we might
actually add a function:

  realloc :: Storable b => Ptr a -> IO (Ptr b)

I think, it is more orthogonal this way.  Any objections?

Cheers,
Manuel

PS: I'll make sure that these points are clarified in the
    FFI spec.
_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to