GUI interface options and environment variables for the Memory Analysis Tool

The following table shows a summary of Memory Analysis Tool (MAT) graphical user interface options (flags) and their corresponding environment variables:

Environment variable Where to find in Memory Analysis Tool GUI What option to set Additional information
LD_PRELOAD= librcheck.so Memory Analysis > Advanced Settings Runtime library The newer library file is librcheck.so; the older file is libmalloc_g.so. A supported option for rcheck library.
MALLOC_ACTION=<number> Memory Analysis > Memory Errors When an error is detected: Set the error action behavior to: 0 to ignore, 1 to abort, 2 to exit, 3 for core, and 4 to stop. A supported option for rcheck library.
MALLOC_BTDEPTH=10 Memory Analysis > Memory Errors Limit back-trace depth to: 5
MALLOC_CKACCESS=1 Memory Analysis > Memory Errors Verify parameters in string and memory functions Check strings and memory functions for errors. A supported option for rcheck library.
MALLOC_CKBOUNDS=1 Memory Analysis > Memory Errors Enable bounds checking (where possible) Check for out of bounds errors. A supported option for rcheck library.
MALLOC_CKALLOC=1 Memory Analysis > Memory Errors Enable check on realloc()/free() argument Check alloc() and free() functions for errors. A supported option for rcheck library.
MALLOC_CKCHAIN=1 Memory Analysis > Memory Errors Perform a full heap integrity check on every allocation/deallocation Check the allocator chain integrity for every allocation/deallocation. A supported option for rcheck library.
MALLOC_CTHREAD=1 Memory Analysis > Advanced Settings Create control thread Start a control thread. A supported option for rcheck library.
MALLOC_DUMP_ LEAKS=1 Memory Analysis > Memory Errors Perform leak check when process exits Enable the dumping of leaks on exit. A supported option for rcheck library.
MALLOC_ERRFILE= /dev/null N/A N/A Error file location.
MALLOC_EVENTBTDEPTH=<number> Memory Analysis > Memory Tracing Limit back-trace depth to: 5 Set the error traces depth to a specific number. A supported option for rcheck library.
MALLOC_FATAL=0 Memory Analysis > Memory Errors When an error is detected: report the error and continue
MALLOC_FILE=<file> Memory Analysis > Advanced Settings Target output file or device: Re-direct output to a file. You can use ${pid} in the filename to replace with process Id and escape $ if running from the shell. A supported option for rcheck library.
MALLOC_HANDLE_SIGNALS=0 N/A N/A When the value is 0, don't install signal handlers. A supported option for the rcheck library.
MALLOC_START_TRACING=1 Memory Analysis > Memory Tracing Enable memory allocation/deallocation tracing Enable memory tracing (0 to disable). A supported option for rcheck library.
MALLOC_STAT_BINS=<bin1>,<bin2>,... Memory Analysis > Memory Snapshots Bin counters (comma separated) e.g. 8, 16, 32, 1024 Set custom bins. A supported option for rcheck library.
MALLOC_TRACEBTDEPTH=<number> Memory Analysis > Memory Tracing Limit back-trace depth to: Set the allocation traces depth to a specific number. A supported option for rcheck library.
MALLOC_TRACEMAX=<number> Memory Analysis > Memory Tracing Maximum allocation to trace: Only trace the allocation for the <= <number> of bytes. A supported option for rcheck library.
MALLOC_TRACEMIN=<number> Memory Analysis > Memory Tracing Minimum allocation to trace: Only trace the allocation for the >= <number> of bytes. A supported option for rcheck library.
MALLOC_TRUNCATE=1 N/A N/A Truncate the output files before writing. A supported option for rcheck library.
MALLOC_USE_CACHE=<number> N/A N/A Set to 0 to disable optimization. The default is 32. A supported option for rcheck library.
MALLOC_VERBOSE=1 Memory Analysis > Advanced Settings Show debug output on console When set to 1, it enables the debug output. A supported option for the rcheck library.
MALLOC_WARN=0 Memory Analysis > Memory Errors When an error is detected: report the error and continue
Related concepts
Memory analysis of shared objects
Related tasks
Analyzing a running program