dmalloc

Debug memory allocation errors in C/C++ programs

brewmacoslinux
Try with needOr install directly
Source

About

Debug versions of system memory management routines

Commands

dmalloc

Examples

Initialize dmalloc settings for basic memory debugging$ eval `dmalloc -b -l logfile`
Enable comprehensive memory debugging with fence post checking$ eval `dmalloc -b -l logfile debug`
Check debug log for memory leaks and allocation errors$ dmalloc -l logfile -p log