### C Library Functions: Dynamic Memory Management

Allocating and Freeing Memory

Function | Header File | Description
_alloca | stdlib.h malloc.h builtin.h | Temporarily allocates storage space from the program's stack.
calloc | stdlib.h malloc.h | Reserves storage space for an array and initializes the values of all elements to 0.
_debug_calloc | stdlib.h malloc.h | Allocates memory and initializes it to 0, checks the heap, and stores information about the allocation.
_debug_free | stdlib.h malloc.h | Releases memory, checks the heap, and stores information about the operation.
_debug_heapmin | stdlib.h malloc.h | Returns unused memory in the heap to the operating system, and stores information about the operation.
_debug_malloc | stdlib.h malloc.h | Allocates memory and initializes it to 0xAA , checks the heap, and stores information about the allocation.
_debug_realloc | stdlib.h malloc.h | Changes the size of an allocated memory block, sets unused memory to 0xAA , checks the heap, and stores information about the operation.
_debug_tcalloc | stdlib.h malloc.h | Allocates tiled memory and initializes it to 0, checks the heap, and stores information about the allocation.
_debug_tfree | stdlib.h malloc.h | Releases tiled memory, checks the heap, and stores information about the operation.
_debug_theapmin | stdlib.h malloc.h | Returns unused memory in the tiled heap to the operating system, and stores information about the operation.
_debug_tmalloc | stdlib.h malloc.h | Allocates tiled memory and initializes it to 0xAA , checks the heap, and stores information about the allocation.
_debug_trealloc | stdlib.h malloc.h | Changes the size of an allocated tiled memory block, initializes unused memory to 0xAA , checks the heap, and stores information about the operation.
_debug_ucalloc | stdlib.h malloc.h | Allocates memory from a specified heap and initializes it to 0 , checks the heap, and stores information about the allocation.
_debug_uheapmin | stdlib.h malloc.h | Returns unused memory from a specified heap to the operating system, and stores information about the operation.
_debug_umalloc | stdlib.h malloc.h | Allocates memory from a specified heap and initializes it to 0xAA, checks the heap, and stores information about the allocation.
free | stdlib.h malloc.h | Frees storage blocks.
_heapmin | stdlib.h malloc.h | Returns all unused memory from the runtime heap to the operating system.
malloc | stdlib.h malloc.h | Allocates memory blocks. Reserves storage blocks.
realloc | stdlib.h malloc.h | Changes storage size allocated for an object.
_tcalloc | stdlib.h malloc.h | Allocates tiled memory and initializes it to 0.
_tfree | stdlib.h malloc.h | Releases tiled memory.
_theapmin | stdlib.h malloc.h | Returns all unused memory from the tiled runtime heap to the operating system.
_tmalloc | stdlib.h malloc.h | Allocates a block of tiled memory.
_trealloc | stdlib.h malloc.h | Changes the size of an allocated tiled memory block.

Heap Information and Checking

Function | Header File | Description
_dump_allocated | stdlib.h malloc.h | Writes information about currently allocated memory blocks.
_dump_allocated_delta | stdlib.h malloc.h | Writes information about currently allocated memory
_heap_check | stdlib.h malloc.h | Validates all allocated memory blocks.
_heapchk | malloc.h | Validates all allocated and freed objects on the default heap.
_heapset | malloc.h | Validates all allocated and freed objects on the default heap, and sets all free memory to a specified value.
_heap_walk | malloc.h | Returns information about allocated and freed objects on the default heap.
_mheap | umalloc.h | Finds out which heap an object was allocated from.
_msize | stdlib.h malloc.h | Returns the size of an allocated block.
_tdump_allocated | stdlib.h malloc.h | Writes information about currently allocated memory blocks from the tiled heap.
_tdump_allocated_delta | malloc.h | Writes information about currently allocated memory blocks from the tiled heap since the last call for this information.
_theap_check | stdlib.h malloc.h | Validates all allocated blocks of tiled memory.
_udump_allocated | umalloc.h | Writes information about currently allocated memory blocks from a specified heap.
_udump_allocated_delta | umalloc.h | Writes information about currently allocated memory blocks from a specified heap since the last call for this information.
_uheap_check | umalloc.h | Validates all allocated memory blocks from a specified heap.
_uheapchk | umalloc.h | Validates all allocated and freed objects on a specified heap.
_uheapset | umalloc.h | Validates all allocated and freed objects on a specified heap, and sets all free memory to a specified value.
_uheap_walk | umalloc.h | Returns information about allocated and freed objects on a specified heap.
_ustats | umalloc.h | Gets information about a specified heap.

Heap Creation and Management

Function | Header File | Description
_uaddmem | umalloc.h | Adds memory to a specified heap.
_uclose | umalloc.h | Closes a heap so it can no longer be used.
_ucreate | umalloc.h | Creates a heap of memory.
_udefault | umalloc.h | Changes the memory heap used as the default heap.
_udestroy | umalloc.h | Destroys a heap.
_uopen | umalloc.h | Opens a heap so it can be used.

Alphabetical Listing of IBM C and C++ Compilers Functions and Macros