Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
Compiler-directed storage reclamation using object lifetime analysis
Publisher:
  • Massachusetts Institute of Technology
  • 201 Vassar Street, W59-200 Cambridge, MA
  • United States
Order Number:AAI0571759
Pages:
1
Reflects downloads up to 09 Nov 2024Bibliometrics
Skip Abstract Section
Abstract

Many heap-oriented languages such as Lisp and Id depend on run-time garbage collection to reclaim storage. Garbage collection can be a significant run-time expense, especially for functional languages that tend to allocate structures often. Compiler-directed storage reclamation reduces the run-time overhead of garbage collection by having the compiler insert deallocation code. Compilers must perform object lifetime analysis in order to insert storage reclamation code. Current approaches to lifetime analysis assume a strict or sequential interpreter.

We formulate an operational semantics for a parallel, non-strict language in order to precisely define when it is safe to deallocate an object. Our operational semantics yields exact information about what objects are allocated, deallocated, and referenced at any point during the execution of a program. Using this information, we define precise run-time conditions that must be met by safe deallocation commands.

We use abstract interpretation to yield at compile-time a summary of what objects are allocated and reachable at any point in a program. We define static conditions that must be met by safe deallocation commands. We then define an algorithm that uses the abstract interpreter to verify the safety of deallocation commands already in programs and an algorithm to insert safe deallocation commands into programs.

We describe our implementation of the lifetime analysis, the verification algorithm, and the insertion algorithm. We then discuss the effectiveness of the compiler at verifying and inserting deallocation commands in several medium-sized Id programs. We also discuss the performance of each program in terms of storage allocated and reclaimed. Our implementation is quite effective for programs with simple patterns of sharing between objects. (Copies available exclusively from MIT Libraries, Rm. 14-0551, Cambridge, MA 02139-4307. Ph. 617-253-5668; Fax 617-253-1690.)

Contributors
  • Hewlett-Packard Inc.
  • MIT Computer Science & Artificial Intelligence Laboratory

Recommendations