Options and environment variables

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

Environment variable Where to find in Memory Analysis Tool UI What option to set Additional information
LD_PRELOAD= librcheck.so Memory Analysis > Advanced Settings Runtime library The newer library file is librcheck.so, and the older file is libmalloc_g.so. A supported option for the 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 the rcheck library.
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 the rcheck library.
MALLOC_CKBOUNDS=1 Memory Analysis > Memory Errors Enable bounds checking (where possible) Check for out of bounds errors. A supported option for the 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 the 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 the rcheck library.
MALLOC_CTHREAD=<1,2> Memory Analysis > Advanced Settings Create control thread Start a control thread. Set to 1 to allow the Momentics IDE to send commands to the application through /dev/rcheck. Set to 2 to allow the Momentics IDE to send commands using signals. A supported option for the rcheck library.
MALLOC_CTRL_FILE=<file> N/A N/A Specify a file for the control command (to use with the control signal). You can use ${pid} in the file name to replace with process Id and escape $ if running from the shell. A supported option for the rcheck library.
MALLOC_CTRL_SIG=<sigs> N/A N/A Override the default signals (for example, "control:41,leaks:42, start:44,stop:43, marker:45"). A supported option for the 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 the 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 the 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 Redirect output to a file. You can use ${pid} in the file name to replace with process Id and escape $ if running from the shell. A supported option for the 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_SAMPLING=<millis> N/A N/A Run sampling thread to produce heap statistics every <millis> milliseconds. 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 the rcheck library.
MALLOC_STAT_BINS=<bin1>,<bin2>,... Memory Analysis > Memory Snapshots Bin counters (comma separated) for example 8, 16, 32, 1024 Set custom bins. A supported option for the 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 the 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 the 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 the rcheck library.
MALLOC_TRUNCATE=1 N/A N/A Truncate the output files before writing. A supported option for the rcheck library.
MALLOC_USE_CACHE=<number> N/A N/A Set to 0 to disable optimization. The default is 32. A supported option for the 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  

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus