Tolerating memory leaks

  • Authors:
  • Michael D. Bond;Kathryn S. McKinley

  • Affiliations:
  • University of Texas at Austin, Austin, TX, USA;University of Texas at Austin, Austin, TX, USA

  • Venue:
  • Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type safety and garbage collection in managed languages eliminate memory errors such as dangling pointers, double frees, and leaks of unreachable objects. Unfortunately, a program still leaks memory if it maintains references to objects it will never use again. Leaked objects decrease program locality and increase garbage collection frequency and workload. A growing leak will eventually exhaust memory and crash the program. This paper introduces a leak tolerance approach called Melt that safely eliminates performance degradations and crashes due to leaks of dead but reachable objects in managed languages, given sufficient disk space to hold leaking objects. Melt (1) identifies stale objects that the program is not accessing; (2) segregates in-use and stale objects by storing stale objects to disk; and (3) preserves safety by activating stale objects if the program subsequently accesses them. We design and build a prototype implementation of Melt in a Java VM and show it adds overhead low enough for production systems. Whereas existing VMs grind to a halt and then crash on programs with leaks, Melt keeps many of these programs running much longer without significantly degrading performance. Melt provides users the illusion of a fixed leak and gives developers more time to fix leaky programs.