Alan Kaminsky Department of Computer Science Rochester Institute of Technology
Home Page

Heaps and Garbage Collection — Lecture Notes

Alan Kaminsky
Department of Computer Science
Rochester Institute of Technology
06-Dec-2001

These notes are a very brief introduction to the subject of heaps and garbage collection. For detailed information, see the Further Reading.

First SlideLast Slide

1.   Terminology
2.   Why Garbage Collection?
3.   Allocation Algorithms
3.1.   Block Data Structure
3.2.   One Big Free Space Organization
3.2.1.   Heap Data Structure
3.2.2.   Allocation Algorithm
3.3.   Free List Organization
3.3.1.   Heap Data Structure
3.3.2.   First-Fit Allocation Algorithm
3.3.3.   Best-Fit Allocation Algorithm
3.4.   When Allocation Fails
4.   Reference Counting Garbage Collection
4.1.   Reference Counters
4.2.   Circular Data Structures
4.3.   Finding Child Pointers
5.   Mark-Sweep Garbage Collection
5.1.   The Mark Bit and the Overall Algorithm
5.2.   Marking Algorithms
5.3.   Sweep Algorithm
6.   Copying Garbage Collection
6.1.   The Overall Algorithm
6.2.   Algorithm Details
7.   Mark-Compact Garbage Collection
7.1.   The Overall Algorithm
7.2.   The Compacting Phase
8.   Generational Garbage Collection
9.   Incremental Garbage Collection
10.   Garbage Collection and Java
11.   Further Reading

Alan Kaminsky Department of Computer Science Rochester Institute of Technology
Home Page
Copyright © 2001 Rochester Institute of Technology. All rights reserved. Last updated 06-Dec-2001. Please send comments to ark­@­cs.rit.edu.