Use the heap-specific versions of the memory management functions to allocate and free memory from a user-created heap that you specify. You can also explicitly use the run-time heap. The names of the heap-specific versions are prefixed by _u (for "user heaps"), for example, _umalloc, and they are defined in <umalloc.h>.
The functions provided are:
There is no heap-specific version of realloc or free. Because they both always check which heap the memory was allocated from, you can always use the regular versions.
Heap-Specific Debug Functions
Use these functions to allocate and free memory from the
user-created heap you specify, and provide information that you
can use to debug memory problems in your own heaps.
The names of the heap-specific debug versions are prefixed by _debug_u, for example, _debug_umalloc, and they are defined in <umalloc.h>.
You can use the debug memory compiler option, /Tm, to map calls to the heap-specific functions to their debug counterparts. You can also call the debug versions of heap-specific functions explicitly. If you parenthesize the calls to the heap-specific memory management functions, they are not mapped to their debug versions.
The functions provided are:
Note that there is no heap-specific debug version of realloc or free. Because they both always check what heap the memory was allocated from, you always use the regular debug versions (_debug_realloc and _debug_free), regardless of what heap the memory came from.
![]()
Memory Management
Functions
Manage Memory with
Multiple Heaps
![]()
Debug Memory
Management Functions