xleak is a lightweight tool for detecting memory leaks and resource mismanagement in C/C++ programs by tracing heap allocations and deallocations with minimal overhead. It hooks into your program’s allocation functions to observe memory usage patterns, helping developers identify locations where memory was allocated but never freed, which is a common source of bugs and performance issues in unmanaged languages. The tool produces detailed reports that show the call stacks associated with leaked allocations, making it easier to track down problematic code paths and fix them. Because it focuses on transparency and low runtime impact, xleak can be used during regular testing cycles without significantly slowing down execution. It also supports integration with unit test suites, allowing teams to automatically enforce memory safety expectations with every build.
Features
- Heap allocation tracking for C/C++ programs
- Leak detection with call stack reports
- Low-overhead instrumentation
- Integration support for test automation
- Simple CLI interface
- Helps improve memory safety