cvmalloc.cc. is a source module you can compile into a .o file and link with your application to help you check for memory allocation problems. It intercepts all calls to malloc() and free (but not realloc()). Aborts the program if it attempts to free what it did not allocate, and at exit, lists all un-freed allocations.
main.cc is a sample main program that can be linked with cvmalloc.o to observe its behavior.
cvmalloc.h is a header file that provides function prototypes for two functions in cvmalloc.o that may be called as an application runs to check for memory leaks.
Works with the GNU C library, glibc.