Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network

  Advanced Search  

Garbage Collection Can Be Faster Than Stack Allocation Andrew W. Appel

Summary: Garbage Collection Can Be Faster Than Stack Allocation
Andrew W. Appel
Department of Computer Science
Princeton University
Princeton, NJ 08544
June 30, 1986
Revised Jan 15, 1987
A very old and simple algorithm for garbage collection gives very good results
when the physical memory is much larger than the number of reachable cells. In fact, the
overhead associated with allocating and collecting cells from the heap can be reduced to
less than one instruction per cell by increasing the size of physical memory. Special
hardware, intricate garbage­collection algorithms, and fancy compiler analysis become
1. Introduction
Many modern programming environments use heap storage with garbage collection. Allocated cells
that are not reachable (via a chain of pointers) from the runtime stack are the ``garbage,'' and they are
``collected'' for re­use by a traversal algorithm. This algorithm typically marks all of the reachable cells
using a depth­first search, and then collects all the unmarked cells[1]; this takes time proportional to total
number of (reachable and garbage) cells.


Source: Appel, Andrew W. - Department of Computer Science, Princeton University


Collections: Computer Technologies and Information Sciences