| 
| Foreign.Marshal.Pool | | Portability | portable |  | Stability | provisional |  | Maintainer | sven.panne@aedion.de |  
  |  
  | 
 | 
 | 
 | 
| Description | 
| This module contains support for pooled memory management. Under this scheme,
 (re-)allocations belong to a given pool, and everything in a pool is
 deallocated when the pool itself is deallocated. This is useful when
 Foreign.Marshal.Alloc.alloca with its implicit allocation and deallocation
 is not flexible enough, but explicit uses of Foreign.Marshal.Alloc.malloc
 and free are too awkward.
 | 
 | 
| Synopsis | 
 | 
 | 
 | 
 | 
| Pool management
 | 
 | 
 | 
 | 
 | 
 | 
| Allocate a fresh memory pool.
 | 
 | 
 | 
| Deallocate a memory pool and everything which has been allocated in the
 pool itself.
 | 
 | 
 | 
| Execute an action with a fresh memory pool, which gets automatically
 deallocated (including its contents) after the action has finished.
 | 
 | 
| (Re-)Allocation within a pool
 | 
 | 
 | 
| Allocate space for storable type in the given pool. The size of the area
 allocated is determined by the sizeOf method from the instance of
 Storable for the appropriate type.
 | 
 | 
 | 
| Allocate the given number of bytes of storage in the pool.
 | 
 | 
 | 
| Adjust the storage area for an element in the pool to the given size of
 the required type.
 | 
 | 
 | 
| Adjust the storage area for an element in the pool to the given size.
 | 
 | 
 | 
| Allocate storage for the given number of elements of a storable type in the
 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.
 | 
 | 
 | 
| Adjust the size of an array in the given pool.
 | 
 | 
 | 
| Adjust the size of an array with an end marker in the given pool.
 | 
 | 
| Combined allocation and marshalling
 | 
 | 
 | 
| Allocate storage for a value in the given pool and marshal the value into
 this storage.
 | 
 | 
 | 
| Allocate consecutive storage for a list of values in the given pool and
 marshal these values into it.
 | 
 | 
 | 
| Allocate consecutive storage for a list of values in the given pool and
 marshal these values into it, terminating the end with the given marker.
 | 
 | 
| Produced by Haddock version 2.4.2 |