memtrack and memview - tracking down memory leaks with LD_PRELOAD This time I want to share a neat application I wrote to track down memory leaks in long-running, multithreaded applications without having to recompile or relink them. It consists of two parts: memtrack, an LD_PRELOAD library that logs every allocation and free, and memview, a curses-based viewer that lets you browse the log and find leaks.
The problem A memory leak rarely announces itself.