Detecting memory leaks in managed languages with Cork
Citations Over TimeTop 22% of 2009 papers
Abstract
Abstract A memory leak in a managed language occurs when the program inadvertently maintains references to objects that it no longer needs. Memory leaks cause systematic heap growth that degrade performance and can result in program crashes after perhaps days or weeks of execution. Prior approaches for detecting memory leaks rely on heap differencing or detailed object statistics which store state proportional to the number of objects in the heap. These overheads preclude their use on the same processor for deployed long‐running applications. This paper introduces Cork as a tool that accurately identifies heap growth caused by leaks. It is space efficient (adding less than 1% to the heap) and time efficient (adding 2.3% on average to total execution time). We implement this approach of examining and summarizing the class of live objects during garbage collection in a class points‐from graph ( CPFG ). Each node in the CPFG represents a class and edges between nodes represent references between objects of the specific classes. Cork annotates nodes and edges with the corresponding volume of live objects. Cork identifies growing data structures across multiple collections and computes a class slice to identify leaks for the user. We experiment with two functions for identifying growth and show that Cork is accurate: it identifies systematic heap growth with no false positives in 4 of 15 benchmarks we tested. Cork's slice report enabled us to quickly identify and eliminate growing data structures in large and unfamiliar programs, something their developers had not previously done. Copyright © 2009 John Wiley & Sons, Ltd.
Related Papers
- → Low-overhead memory leak detection using adaptive statistical profiling(2004)240 cited
- → Precise memory leak detection for java software using container profiling(2008)140 cited
- → LeakBot: An Automated and Lightweight Tool for Diagnosing Memory Leaks in Large Java Applications(2003)125 cited
- → Bell(2006)104 cited
- → Object ownership profiling(2007)62 cited