Efficiently and precisely locating memory leaks and bloat

Gene Novark, Emery D. Berger, Benjamin G. Zorn
2009 Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation - PLDI '09  
Inefficient use of memory, including leaks and bloat, remain a significant challenge for C and C++ developers. Applications with these problems become slower over time as their working set grows and can become unresponsive. At the same time, memory leaks and bloat remain notoriously difficult to debug, and comprise a large number of reported bugs in mature applications. Previous tools for diagnosing memory inefficiencies-based on garbage collection, binary rewriting, or code sampling-impose
more » ... overheads (up to 100X) or generate many false alarms. This paper presents Hound, a runtime system that helps track down the sources of memory leaks and bloat in C and C++ applications. Hound employs data sampling, a staleness-tracking approach based on a novel heap organization, to make it both precise and efficient. Hound has no false positives, and its runtime and space overhead are low enough that it can be used in deployed applications. We demonstrate Hound's efficacy across a suite of synthetic benchmarks and real applications.
doi:10.1145/1542476.1542521 dblp:conf/pldi/NovarkBZ09 fatcat:ixnysosw5beftclkpx4fd3sdky