Testing Memory Boundaries

When the boundary checking feature is turned on, the dbg_test() function can be used to check that all memory boundaries are still intact. dbg_test() has the following prototype:

void dbg_test(const char *description);

This checks all memory blocks allocated while boundary checking is on to verify that memory boundaries have not been violated. It checks both the beginnings and the endings of all such blocks.


Memory bounds testing has a significant impact on performance and should only be enabled to assist in program testing and debugging.