Functions for checking memory heaps

The header file umalloc.h declares a set of functions for validating user-created heaps. These functions are not controlled by a compiler option, so you can use them in your program at any time. Regular versions of these functions, without the _u prefix, are also available for checking the default heap. The heap-checking functions are summarized in the following table.
Table 1. Functions for checking memory heaps
Default heap function User-created heap function Description
_heapchk _uheapchk Checks the entire heap for minimal consistency.
_heapset _uheapset Checks the free memory in the heap for minimal consistency, and sets the free memory in the heap to a value you specify.
_heap_walk _uheap_walk Traverses the heap and provides information about each allocated or freed object to a callback function that you provide.

To compile an application that calls the user-created heap functions, see Compiling and linking a program with user-created heaps.