Detecting memory leaks in managed languages with Cork

被引:13
|
作者
Jump, Maria [1 ]
McKinley, Kathryn S. [2 ]
机构
[1] Kings Coll London, Dept Math & Comp Sci, Wilkes Barre, PA 18711 USA
[2] Univ Texas Austin, Austin, TX 78712 USA
来源
SOFTWARE-PRACTICE & EXPERIENCE | 2010年 / 40卷 / 01期
基金
美国国家科学基金会;
关键词
memory leaks; runtime analysis; dynamic; garbage collection;
D O I
10.1002/spe.945
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 toot 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-In 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 (C) 2009 John Wiley & Sons, Ltd.
引用
收藏
页码:1 / 22
页数:22
相关论文
共 50 条
  • [21] Detecting and Preventing Spills and Leaks
    Siew, Howard
    Howsare, Brian
    [J]. Chemical Engineering (United States), 2022, 129 (05): : 50 - 53
  • [22] Detecting airport fuel leaks
    不详
    [J]. MECHANICAL ENGINEERING, 1998, 120 (12) : 24 - 24
  • [23] DETECTING LEAKS IN SMALL PARTS
    MENNENGA, H
    [J]. VAKUUM-TECHNIK, 1980, 29 (07): : 195 - 200
  • [24] Detecting leaks in plastic pipes
    Hunaidi, O
    Chu, W
    Wang, A
    Guan, W
    [J]. JOURNAL AMERICAN WATER WORKS ASSOCIATION, 2000, 92 (02): : 82 - 94
  • [25] DETECTING UNDERGROUND PIPING LEAKS
    SCHWENDEMAN, T
    [J]. CIVIL ENGINEERING, 1987, 57 (08): : 56 - 58
  • [26] DETECTING SYSTEM AIR LEAKS
    SCHAFER, LA
    [J]. INSTRUMENTATION TECHNOLOGY, 1970, 17 (07): : 64 - &
  • [27] Detecting leaks at the speed of sound
    Anon
    [J]. Journal of Offshore Technology, 2001, 9 (02):
  • [28] Detecting airport fuel leaks
    不详
    [J]. AIRCRAFT ENGINEERING AND AEROSPACE TECHNOLOGY, 2001, 73 (01): : 80 - 81
  • [29] Profiling Object Life Ranges for Detecting Memory Leaks in Java']Java Virtual Machine
    Sun, Qingyue
    Shi, Xiaohua
    Xie, Junru
    [J]. 2012 13TH INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED COMPUTING, APPLICATIONS, AND TECHNOLOGIES (PDCAT 2012), 2012, : 154 - 157
  • [30] Detecting leaks in piping systems
    [J]. Chemical Processing, 1998, 61 (06):