Teaching garbage collection without implementing compiler or interpreters


Given the widespread use of memory-safe languages, students must understand garbage collection well. Following a constructivist philosophy, an effective approach would be to have them implement garbage collectors. Unfortunately, a full implementation depends on substantial knowledge of compilers and runtime systems, which many courses do not cover or cannot assume. This paper presents an instructive approach to teaching GC, where students implement it atop a simplified stack and heap. Our approach eliminates enormous curricular dependencies while preserving the essence of GC algorithms. We take pains to enable testability, comprehensibility, and facilitates debugging. Our approach has been successfully classroom-tested for several years at several institutions.

DOI: 10.1145/2445196.2445314

Extracted Key Phrases

6 Figures and Tables

Cite this paper

@inproceedings{Cooper2013TeachingGC, title={Teaching garbage collection without implementing compiler or interpreters}, author={Gregory H. Cooper and Arjun Guha and Shriram Krishnamurthi and Jay A. McCarthy and Robert Bruce Findler}, booktitle={SIGCSE}, year={2013} }