For the moment I am using the C function memalign() like this:
foreign import ccall "static stdlib.h"
memalign :: CInt -> CInt -> IO (Ptr CChar)
iirc, memalign is not provided on windows, nor by mingw.
so this wouldn't be portable.
claus
Storable.alignment is not used, it is there for informational purposes
only - i.e. what alignment does this type need. Foreign.malloc should
return memory aligned to the maximum alignment required by any primitive
type, and any C structure type (the same as malloc(), in other words).
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users