mallocBytes :: Int -> IO (Ptr a)
base Foreign.Marshal.Alloc
Allocate a block of memory of the given number of 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 may be deallocated using free or finalizerFree when no longer required.
pooledMallocBytes :: Pool -> Int -> IO (Ptr a)
base Foreign.Marshal.Pool
Allocate the given number of bytes of storage in the pool.