Using MALLOC_DEBUG to find memory misuse.
Asterisk’s MALLOC_DEBUG is a compile time tool that helps find some common memory usage problems such as memory corruption and memory leaks. The debug tool helps find similar things as valgrind but without the huge performance penalty. You enable MALLOC_DEBUG in menuselect’s “Compiler Flags” menu along with other useful compile time options like DONT_OPTIMIZE. With