Tracking, Monitoring and Debugging Memory

Several tools help you track, test, and debug memory in extend products, including the runtime and linked C programs. These facilities are particularly helpful when ACUCOBOL-GT programs interface frequently with C programs.

All products have the ability to monitor, test, and debug memory allocations in three ways. They can:

These facilities are described in detail in Memory Testing and Error Handling. How these facilities are accessed via C is described in the following sections.

Note: The memory allocation features can be turned on and off using the appropriate runtime options (described in Memory Testing and Error Handling), and the available monitoring, testing, and debugging features are determined by the state of the parallel runtime option. For example, when boundary checking is turned off, memory boundaries are not set and executing dbg_test() does not test the boundaries of blocks allocated. Similarly, turning off memory tracking will stop keeping track of newly allocated memory, and the numbers reported will not reflect blocks allocated while the feature is off.