next up previous contents
Next: Using Memory Tracing Up: Memory Tracing Previous: Memory Tracing   Contents


Activating Memory Tracing

Memory tracing has to be activated at configure time. The standard malloc statements are overridden with macros (CCTK_MALLOC). To activate memory tracing use either

DEBUG=all
Enables all debug options (compiler debug flags, redefines malloc)
DEBUG=memory
Redefine malloc only.

The CCTK_MALLOC statements can also be used directly in the C code. But by employing them this way, only a fraction of the total memory consumption is traced. Also, they cannot be turned off at configure time. For example:

machine> gmake bigbuild DEBUG=yes

machine> gmake bigbuild-config DEBUG=memory
The new configuration bigbuild is configured with all debugging features turned on. The already existing configuration bigbuild is reconfigured with memory tracing only.