alloca

alloca :: Storable a => (Ptr a -> IO b) -> IO b
base Foreign.Marshal.Alloc
alloca f executes the computation f, passing as argument a pointer to a temporarily allocated block of memory sufficient to hold values of type a. The memory is freed when f terminates (either normally or via an exception), so the pointer passed to f must not be used after this.
allocaArray :: Storable a => Int -> (Ptr a -> IO b) -> IO b
base Foreign.Marshal.Array
Temporarily allocate space for the given number of elements (like Foreign.Marshal.Alloc.alloca, but for multiple elements).
allocaArray0 :: Storable a => Int -> (Ptr a -> IO b) -> IO b
base Foreign.Marshal.Array
Like allocaArray, but add an extra position to hold a special termination element.
allocaBytes :: Int -> (Ptr a -> IO b) -> IO b
base Foreign.Marshal.Alloc
allocaBytes n f executes the computation f, passing as argument a pointer to a temporarily allocated block of memory of n bytes. The block of memory is sufficiently aligned for any of the basic foreign types that fits into a memory block of the allocated size. The memory is freed when f terminates (either normally or via an exception), so the pointer passed to f must not be used after this.
allocaBytesAligned :: Int -> Int -> (Ptr a -> IO b) -> IO b
base Foreign.Marshal.Alloc
package allocated-processor
package
See module docs for more information, and "cv-combinators" package for example usage. Version 0.0.2
data AllocationStrategy
bytestring Data.ByteString.Builder.Extra
A buffer allocation strategy for executing Builders.
mallocArray :: Storable a => Int -> IO (Ptr a)
base Foreign.Marshal.Array
Allocate storage for the given number of elements of a storable type (like Foreign.Marshal.Alloc.malloc, but for multiple elements).
mallocArray0 :: Storable a => Int -> IO (Ptr a)
base Foreign.Marshal.Array
Like mallocArray, but add an extra position to hold a special termination element.
pooledMallocArray :: Storable a => Pool -> Int -> IO (Ptr a)
base Foreign.Marshal.Pool
Allocate storage for the given number of elements of a storable type in the pool.
pooledMallocArray0 :: Storable a => Pool -> Int -> IO (Ptr a)
base Foreign.Marshal.Pool
Allocate storage for the given number of elements of a storable type in the pool, but leave room for an extra element to signal the end of the array.
pooledReallocArray :: Storable a => Pool -> Ptr a -> Int -> IO (Ptr a)
base Foreign.Marshal.Pool
Adjust the size of an array in the given pool.
pooledReallocArray0 :: Storable a => Pool -> Ptr a -> Int -> IO (Ptr a)
base Foreign.Marshal.Pool
Adjust the size of an array with an end marker in the given pool.
reallocArray :: Storable a => Ptr a -> Int -> IO (Ptr a)
base Foreign.Marshal.Array
Adjust the size of an array
reallocArray0 :: Storable a => Ptr a -> Int -> IO (Ptr a)
base Foreign.Marshal.Array
Adjust the size of an array including an extra position for the end marker.