Publisher review:Mem.H - Mem package header Memory management routines.Compiling:#define MEM_DEBUG 1 when compiling to enable extended debugging features.Features always enabled:- mem_init() is called at startup, and mem_term() at close, which checks to see that the number of alloc's is the same as the number of free's.- Behavior on out-of-memory conditions can be controlled via mem_setexception().
Extended debugging features:
- Enabled by #define MEM_DEBUG 1 when compiling.- Check values are inserted before and after the alloc'ed data to detect pointer underruns and overruns.- Free'd pointers are checked against alloc'ed pointers.- Free'd storage is cleared to smoke out references to free'd data.- Realloc'd pointers are always changed, and the previous storage is cleared, to detect erroneous dependencies on the previous pointer.- The routine mem_checkptr() is provided to check an alloc'ed pointer.
Mem.H is a C/C++ script for Snippets scripts design by Walter Bright.
It runs on following operating system: Windows / Linux / BSD / Solaris.
Operating system:Windows / Linux / BSD / Solaris