MALLOC_DEBUG enhancements can be used as a poor-man's Valgrind if Valgrind performance makes the PC unusable due to resource consumption.
Gathering output
- Run menuselect and in the Compiler Options, enable MALLOC_DEBUG. A bug marshal may also ask you to enable additional compiler flags depending upon the nature of the issue.
- Rebuild and install Asterisk
- Run Asterisk and reproduce the issue.
- Collect the /var/log/asterisk/mmlog (which will be generated only if you successfully compiled with the MALLOC_DEBUG flag)
- Attach the mmlog file as mmlog.txt to the issue in our issue tracker.
Commands provided
Compiling with this flag results in several commands being made available for memory debugging. Below are the usage and summaries from "core show help" for each command in Asterisk 12.
memory show summary
memory show allocations
memory atexit list
memory atexit summary
memory backtrace