Cork
Authors:
Open Access
- 17 January 2007
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 42 (1) , 31-38
Abstract
A memory leak in a garbage-collected program occurs when the program inadvertently maintains references to objects that it no longer needs. Memory leaks cause systematic heap growth, degrading performance and resulting 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 a dynamic heap-summarization technique based on type that accurately identifies leaks, is space efficient (adding less than 1% to the heap), and is time efficient (adding 2.3% on average to total execution time). We implement this approach in Cork which utilizes dynamic type information and garbage collection to summarize the live objects in a type points-from graph ( TPFG ) whose nodes (types) and edges (references between types) are annotated with volume. Cork compares TPFG s across multiple collections, identifies growing data structures, and computes a type slice for the user. 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 (non-experts) to quickly eliminate growing data structures in SPECjbb2000 and Elipse, something their developers had not previously done. Cork is accurate, scalable, and efficient enough to consider using online.Keywords
This publication has 13 references indexed in Scilit:
- Bell2006
- The DaCapo benchmarks2006
- The DaCapo benchmarksACM SIGPLAN Notices, 2006
- SafeMem: Exploiting ECC-Memory for Detecting Memory Leaks and Memory Corruption During Production Runs2005
- Low-overhead memory leak detection using adaptive statistical profiling2004
- Myths and realities2004
- A practical flow-sensitive and context-sensitive C and C++ memory leak detector2003
- Visualizing reference patterns for solving memory leaks in JavaConcurrency: Practice and Experience, 2000
- Adaptive optimization in the Jalapeño JVM2000
- Implementing jalapeño in Java1999