realloc

realloc :: Storable b => Ptr a -> IO (Ptr b)
base Foreign.Marshal.Alloc
Resize a memory area that was allocated with malloc or mallocBytes to the size needed to store values of type b. The returned pointer may refer to an entirely different memory area, but will be suitably aligned to hold values of type b. The contents of the referenced memory area will be the same as of the original pointer up to the minimum of the original size and the size of values of type b. If the argument to realloc is nullPtr, realloc behaves like malloc.
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.
reallocBytes :: Ptr a -> Int -> IO (Ptr a)
base Foreign.Marshal.Alloc
Resize a memory area that was allocated with malloc or mallocBytes to the given size. The returned pointer may refer to an entirely different memory area, but will be sufficiently aligned for any of the basic foreign types that fits into a memory block of the given size. The contents of the referenced memory area will be the same as of the original pointer up to the minimum of the original size and the given size. If the pointer argument to reallocBytes is nullPtr, reallocBytes behaves like malloc. If the requested size is 0, reallocBytes behaves like free.
pooledRealloc :: Storable a => Pool -> Ptr a -> IO (Ptr a)
base Foreign.Marshal.Pool
Adjust the storage area for an element in the pool to the given size of the required type.
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.
pooledReallocBytes :: Pool -> Ptr a -> Int -> IO (Ptr a)
base Foreign.Marshal.Pool
Adjust the storage area for an element in the pool to the given size.