As with any alternate vendor heap manager, you must specify the
dllname with the environment variable _CEE_HEAP_MANAGER to indicate
that MEMCHECK VHM will be used to manage the user heap. Since CEE_HEAP_MANAGER
must be set before any user code gains control, use the ENVAR runtime
option to set the variable or set it inside the file specified by
environment variables _CEE_ENVFILE or _CEE_ENVFILE_S. The format follows:
_CEE_HEAP_MANAGER=dllname
The following two DLLs are associated with MEMCHECK VHM and use
the following events.
- CEL4MCHK: 31-bit base and XPLINK
- CELQMCHK: 64-bit
- _VHM_INIT
- replaces C-RTL malloc(), calloc(), realloc(), and free() with
the corresponding MEMCHECK VHM functions. This event is only at Language Environment® Initialization
and only called by Language
Environment.
- _VHM_TERM
- terminates Vendor Heap Manager to free the memcheck storage functions.
This event is called only by Language Environment at Language Environment Termination.
- _VHM_REPORT
- generates the Heap Leak Report and the optional Trace Report.
This new event will be called by Language Environment at Language Environment Termination
and will write the Heap Leak Report (and the optional Trace Report
if the _CEE_MEMCHECK_TRACE environment variable is active) in the
output file name specified in _CEE_MEMCHECK_OUTFILENAME. This event
can also be called dynamically by the __vhm_event() API.