DUMA (Detect Unintended Memory Access) is a multi-platform memory debugging library. It can detect memory leaks and buffer overruns (or underruns) in a malloc() / new memory buffer. DUMA is a fork of Bruce Perens' Electric Fence library.
sourceforge isn't maintained for many years!
suggest you want to look at https://github.com/johnsonjh/duma