Functions for managing user-created heaps

The libhu.a library provides a set of functions with which you can manage user-created heaps. These functions are all prefixed by _u (for "user" heaps), and they are declared in the header file umalloc.h. The following table summarizes the functions available for creating and managing user-defined heaps.
Table 1. Functions for managing memory heaps
Default heap function Corresponding user-created heap function Description
n/a _ucreate Creates a heap. Described in Creating a heap.
n/a _uopen Opens a heap for use by a process. Described in Using a heap.
n/a _ustats Provides information about a heap. Described in Getting information about a heap.
n/a _uaddmem Adds memory blocks to a heap. Described in Expanding a heap.
n/a _uclose Closes a heap from further use by a process. Described in Closing and destroying a heap.
n/a _udestroy Destroys a heap. Described in Closing and destroying a heap.
calloc _ucalloc Allocates and initializes memory from a heap you have created. Described in Using a heap.
malloc _umalloc Allocates memory from a heap you have created. Described in Using a heap.
_heapmin _uheapmin Returns unused memory to the system. Described in Closing and destroying a heap.
n/a _udefault Changes the default runtime heap to a user-created heap. Described in Changing the default heap used in a program.
Note: There are no user-created heap versions of realloc or free. These standard functions always determine the heap from which memory is allocated, and can be used with both user-created and default memory heaps.