guarded-allocation-0.0: Memory allocation with added stress tests and integrity checks

Safe HaskellSafe
LanguageHaskell98

Foreign.Marshal.Array.Guarded.Debug

Synopsis

Documentation

create :: Storable a => Int -> (Ptr a -> IO b) -> IO (ForeignPtr a, b) Source #

Array creation with additional immutability check, electrical fence and pollution of uncleaned memory.

The function checks that the array is not altered anymore after creation.

alloca :: Storable a => Int -> (Ptr a -> IO b) -> IO b Source #