Heap Memory Manager
A heap memory manager is responsible for the management of heap memory.
- Allocation - performed by
malloc
andcalloc
- Deallocation - performed by
free
- Reallocation - performed by
realloc
The ILE runtime provides three different heap memory managers:
- Default memory manager - a general-purpose memory manager
- Quick Pool memory manager - a pool memory manager
- Debug memory manager - a memory manager for debugging application heap problems
In addition, each of the memory managers has two different versions - a single-level store version and a teraspace version. In most cases, the two versions behave similarly except that the single-level store version returns pointers into single-level store storage and the teraspace version returns pointers into teraspace storage. The single-level store versions are limited to slightly less than 16 MB for a single allocation. The single-level store versions are also limited to slightly less than 4 GB for the maximum amount of allocated heap storage. The teraspace versions are not subject to these limitations. For additional information about single-level store and teraspace storage, please refer to the ILE Concepts manual.
The default memory manager is the preferred choice for most applications and is the memory manager enabled by default. The other memory managers have unique characteristics that can be beneficial in specific circumstances. Environment variables can be used to indicate which heap manager to use as well as to provide heap manager options. In some cases, functions are also available to indicate which heap manager to use.