The Heap tab allows you to choose how Win32 Heaps are managed.
The picture below shows the default settings:
Memory Validator can run background checks on the input pointers to HeapReAlloc() and HeapFree() for validity and report any errors.
•Enable checks on HeapReAlloc and HeapFree enables detection (off by default)
When this is enabled you may wish to prevent those functions from being called when an invalid pointer is detected.
•Don't call function when error detected prevent Win32 heap checking breakpoints from being triggered when an error is detected
The reason you might not want to call the functions is that the Win32 heap checking code will force a debugger breakpoint instruction to be executed, which will either terminate your program or start a debugger to attach to the program. Avoiding these heap checks when Memory Validator already knows about the error will prevent the program run from being interrupted by a breakpoint.
Memory Validator can interpret the call to HeapDestroy() in two ways.
•Mark all non-deallocated memory as deallocted. use this if you are ignoring calls to HeapFree() because you will be calling HeapDestroy() at the end of the function. An example use case would be implementing a linear heap.
•Mark all non-deallocated memory as leaked. use this if you are using Win32 heaps as the backing store for your own memory allocator.
The default option is to mark non-deallocated memory as leaked as this is the most common usage pattern.
Memory Validator inspects the memory pointers passed to realloc(), _expand(), free(), delete and delete [].
Any damage to the part of the heap that contains the memory pointer is reported, and normally, the intended CRT function call is ignored to prevent the application from the typically resulting crash.
•Call the CRT function... allows the CRT function call to proceed anyway even if damaged memory has been detected (switched off by default)
Reset All - Resets all global settings, not just those on the current page.
Reset - Resets the settings on the current page.