malloc-wrapper is an LD_PRELOAD'able shared library for tracking down memory leaks. It is suitable for use with C or Python, and perhaps other languages. It only tracks malloc() and free().

Because it is LD_PRELOAD'able, it can be used without recompiling the binary you want to examine.

See the included Makefile for usage examples; test-program.c is of course a C test program, and test-program2 is a Python test program.

It can be downloaded here.


Hits: 551
Timestamp: 2021-09-19 12:26:53 PDT

Back to Dan's tech tidbits

You can e-mail the author with questions or comments: