skip to main content
10.1145/2401603.2401664acmotherconferencesArticle/Chapter ViewAbstractPublication PagesracsConference Proceedingsconference-collections
research-article

Memory leak detection with context awareness

Published:23 October 2012Publication History

ABSTRACT

Embedded applications with a long running life time particularly require a high degree of reliability. Many types of weaknesses residing in software can reduce the reliability, but memory leaks are prominent sources of software weaknesses for long running applications. As memory leaks are typically cumbersome and illusive, finding their sources demands programmers to make a huge effort even with fairly automated memory leak detection tools. Recently, dynamic detectors with light overheads have been emerged. They use sampling-based techniques to reduce overheads. According to the frequencies of code executions and data accesses, the memory monitor adaptively controls the sampling periods. The accuracies of existing sampling techniques are, however, unsatisfactory in some cases. In this paper, we present a more accurate memory leak detection technique, which takes advantage of context information. Our memory leak detector, which is also based on data sampling, adopts a notion of context (or call path) to sort out dynamically allocated memories and more accurately tracks the sources of memory leaks in the source code. Our experiments with SPEC CINT2000 benchmarks show our technique finds more memory leaks by up to 72% with comparable overheads to the existing data sampling technique.

References

  1. M. Arnold and B. Ryder. A framework for reducing the cost of instrumented code. In Proceedings of PLDI'01. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. D. Bond and K. S. McKinley. Tolerating memory leaks. In Proceedings of OOPSLA '08. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. M. Chilimbi and M. Hauswirth. Low-overhead memory leak detection using adaptive statistical profiling. In Proceedings of ASPLOS'04. ACM, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. E. D. B. Gene Novark and B. G. Zorn. Efficiently and precisely locating memory leaks and bloat. In Proceedings of PLDI'09. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. L. Heine and M. S. Lam. A practical flow-sensitive and context-sensitive c and c++ memory leak detector. In Proceedings of PLDI'03. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. L. Henning. SPEC CPU2000: Measuring CPU performance in the new millennium. IEEE Computer, pages 28--35, July 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In Proceedings of PLDI'07. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. H. H. Nguyen and M. Rinard. Detecting and eliminating memory leaks using cyclic memory allocation. In Proceedings of ISMM'07. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. L. P. S. Cherem and R. Rugina. Practical memory leak detection using guarded value-flow analysis. In Proceedings of PLDI'07. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. L. Seidl and B. G. Zorn. Segregating heap objects by reference behavior and lifetime. In Proceedings of ASPLOS'98. ACM, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Y. Xie and A. Aiken. Context- and path-sensitive memory leak detection. In Proceedings of ESEC/FSE'05. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Q. G. Y. Tang and F. Qin. Leaksurvivor: Towards safely tolerating memory leaks for garbage-collected languages. In Proceedings of USENIX '08, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Memory leak detection with context awareness

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Other conferences
      RACS '12: Proceedings of the 2012 ACM Research in Applied Computation Symposium
      October 2012
      488 pages
      ISBN:9781450314923
      DOI:10.1145/2401603

      Copyright © 2012 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 23 October 2012

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate393of1,581submissions,25%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader