Strongly Specify Alignment for FFI Allocation
thomas.dubuisson at gmail.com
Tue Sep 29 21:52:17 EDT 2009
John Meacham wrote:
> What about something like
>> alloca $ \ptr -> ... where ptr :: Ptr Word8.
> wouldn't ptr only need byte alignment? if the implementation allocates
> such values on the stack then it may be hard to guarentee otherwise.
> So, I think the extra verbiage should only apply to routines that
> allocate based on a size in bytes, rather than when allocating a
> specific type like with the plain alloca and malloc routines.
I had a knee-jerk reaction against this comment, but the more I
reflect the more I agree it's probably the right way to go.
More information about the Haskell-prime