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 条
  • [1] Tizen .NET Memory Profiler Investigate managed memory leaks
    Ayrapetyan, Ruben
    Kvochko, Andrey
    [J]. 2017 IVANNIKOV ISPRAS OPEN CONFERENCE (ISPRAS), 2017, : 39 - 44
  • [2] Symbolic pointer analysis for detecting memory leaks
    Scholz, B
    Blieberger, J
    Fahringer, T
    [J]. ACM SIGPLAN NOTICES, 1999, 34 (11) : 104 - 113
  • [3] Detecting and Eliminating Memory Leaks Using Cyclic Memory Allocation
    Nguyen, Huu Hai
    Rinard, Martin
    [J]. ISMM'07: PROCEEDINGS OF THE 2007 INTERNATIONAL SYMPOSIUM ON MEMORY MANAGEMENT, 2007, : 15 - 29
  • [4] A dynamic approach to detecting, eliminating and fixing memory leaks
    Yu, Bin
    Tian, Cong
    Zhang, Nan
    Duan, Zhenhua
    Du, Hongwei
    [J]. JOURNAL OF COMBINATORIAL OPTIMIZATION, 2021, 42 (03) : 409 - 426
  • [5] A dynamic approach to detecting, eliminating and fixing memory leaks
    Bin Yu
    Cong Tian
    Nan Zhang
    Zhenhua Duan
    Hongwei Du
    [J]. Journal of Combinatorial Optimization, 2021, 42 : 409 - 426
  • [6] Cork: Dynamic Memory Leak Detection for Garbage-Collected Languages
    Jump, Maria
    McKinley, Kathryn S.
    [J]. CONFERENCE RECORD OF POPL 2007: THE 34TH ACM SIGPLAN SIGACT SYMPOSIUM ON PRINCIPLES OF PROGAMMING LANGUAGES, 2007, : 31 - 38
  • [7] Cork: Dynamic memory leak detection for garbage-collected languages
    Jump, Maria
    McKinley, Kathryn S.
    [J]. ACM SIGPLAN NOTICES, 2007, 42 (01) : 31 - 38
  • [8] Detecting Kernel Memory Leaks in Specialized Modules with Ownership Reasoning
    Emamdoost, Navid
    Wu, Qiushi
    Lu, Kangjie
    McCamant, Stephen
    [J]. 28TH ANNUAL NETWORK AND DISTRIBUTED SYSTEM SECURITY SYMPOSIUM (NDSS 2021), 2021,
  • [9] Leakchecker: Practical static memory leak detection for managed languages
    Yan, Dacong
    Xu, Guoqing
    Yang, Shengqian
    Rountev, Atanas
    [J]. Proceedings of the 12th ACM/IEEE International Symposium on Code Generation and Optimization, CGO 2014, 2014, : 87 - 97
  • [10] Emulating and Evaluating Hybrid Memory for Managed Languages on NUMA Hardware
    Akram, Shoaib
    Sartor, Jennifer B.
    McKinley, Kathryn S.
    Eeckhout, Lieven
    [J]. 2019 IEEE INTERNATIONAL SYMPOSIUM ON PERFORMANCE ANALYSIS OF SYSTEMS AND SOFTWARE (ISPASS), 2019, : 93 - 105