Each debug function calls _heap_check (or _uheap_check) to check the heap. Although this is useful, it can also increase your program's memory requirements and decrease its execution speed.
To reduce the overhead of checking the heap on every debug memory management function, you can use the HD_SKIP environment variable to control how often the functions check the heap. You will not need to do this for most of your applications unless the application is extremely memory intensive.
Set HD_SKIP like any other environment variable. The syntax for HD_SKIP is:
set HD_SKIP=increment,[start]
where:
For example, if you specify:
set HD_SKIP=10
then every tenth debug memory function call performs a heap check. If you specify:
set HD_SKIP=5,100
then after 100 debug memory function calls, only every fifth call performs a heap check.
When you use the start parameter to start skipping heap checks, you are trading off heap checks that are done implicitly against program execution speed. You should therefore start with a small increment (like 5) and slowly increase until the application is usable.