Memory leak detection with context awareness

  • Authors:
  • Woosup Lim;Seongsoo Park;Hwansoo Han

  • Affiliations:
  • Altibase Ltd., Seoul, Korea;Sungkyunkwan University, Suwon, Korea;Sungkyunkwan University, Suwon, Korea

  • Venue:
  • Proceedings of the 2012 ACM Research in Applied Computation Symposium
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

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.