Controlling HeapTrc with environment variables
The HeapTrcunit can be controlled with the HEAPTRCenvironment variable. The contents of this variable controls the initial setting of some constants in the unit. HEAPTRCconsists of one or more of the following strings, separated by spaces:
- keepreleased
- If this string occurs, then the KeepReleasedvariable is set to True
- disabled
- If this string occurs, then the UseHeapTracevariable is set to Falseand the heap trace is disabled. It does not make sense to combine this value with other values.
- nohalt
- If this string occurs, then the HaltOnErrorvariable is set to False, so the program continues executing even in case of a heap error.
- log=filename
- If this string occurs, then the output of heaptrc is sent to the specified Filename. (see also SetHeapTraceOutput)
The following are valid values for the HEAPTRC variable:
HEAPTRC=disabled
HEAPTRC="keepreleased log=heap.log"
HEAPTRC="log=myheap.log nohalt"
Note that these strings are case sensitive, and the name of the variable too.