KAL: kernel-assisted non-invasive memory leak tolerance with a general-purpose memory allocator

  • Authors:
  • Jinkyu Jeong;Euiseong Seo;Jeonghwan Choi;Hwanju Kim;Heeseung Jo;Joonwon Lee

  • Affiliations:
  • Computer Architecture Laboratory, Computer Science Department, Korea Advanced Institute of Science and Technology, Daejeon, Korea;School of Electrical and Computer Engineering, Ulsan National Institute of Science and Technology, Ulsan, Korea;School of Information and Communication Engineering, Sungkyunkwan University, Suwon, Korea;Computer Architecture Laboratory, Computer Science Department, Korea Advanced Institute of Science and Technology, Daejeon, Korea;Computer Architecture Laboratory, Computer Science Department, Korea Advanced Institute of Science and Technology, Daejeon, Korea;School of Information and Communication Engineering, Sungkyunkwan University, Suwon, Korea

  • Venue:
  • Software—Practice & Experience
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Memory leaks are a continuing problem in the software developed with programming languages, such as C and C++. A recent approach adopted by some researchers is to tolerate leaks in the software application and to reclaim the leaked memory by use of specially constructed memory allocation routines. However, such routines replace the usual general-purpose memory allocator and tend to be less efficient in speed and in memory utilization. We propose a new scheme which coexists with the existing memory allocation routines and which reclaims memory leaks. Our scheme identifies and reclaims leaked memory at the kernel level. There are some major advantages to our approach: (1) the application software does not need to be modified; (2) the application does not need to be suspended while leaked memory is reclaimed; (3) a remote host can be used to identify the leaked memory, thus minimizing impact on the application program's performance; and (4) our scheme does not degrade the service availability of the application while detecting and reclaiming memory leaks. We have implemented a prototype that works with the GNU C library and with the Linux kernel. Our prototype has been tested and evaluated with various real-world applications. Our results show that the computational overhead of our approach is around 2% of that incurred by the conventional memory allocator in terms of throughput and average response time. We also verified that the prototype successfully suppressed address space expansion caused by memory leaks when the applications are run on synthetic workloads. Copyright © 2010 John Wiley & Sons, Ltd.