Compiler support for garbage collection in a statically typed language

  • Authors:
  • Amer Diwan;Eliot Moss;Richard Hudson

  • Affiliations:
  • -;-;-

  • Venue:
  • PLDI '92 Proceedings of the ACM SIGPLAN 1992 conference on Programming language design and implementation
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

We consider the problem of supporting compacting garbage collection in the presence of modern compiler optimizations. Since our collector may move any heap object, it must accurately locate, follow, and update all pointers and values derived from pointers. To assist the collector, we extend the compiler to emit tables describing live pointers, and values derived from pointers, at each program location where collection may occur. Significant results include identification of a number of problems posed by optimizations, solutions to those problems, a working compiler, and experimental data concerning table sizes, table compression, and time overhead of decoding tables during collection. While gc support can affect the code produced, our sample programs show no significant changes, the table sizes are a modest fraction of the size of the optimized code, and stack tracing is a small fraction of total gc time. Since the compiler enhancements are also modest, we conclude that the approach is practical.