Lecture 15: Memory Management
Topics
- Memory management
- Memory safety
- Spatial safety
- Temporal safety
- Garbage collection
- reference counting
- mark and sweep
- copying collection
- generational collection
- Language-parametric memory management
- scopes describe frames
Slides
Reading Material
-
Andrew W. Appel and Jens Palsberg (2002). Garbage Collection. In Modern Compiler Implementation in Java, 2nd edition. Cambridge University Press.
The lecture closely follows the discussion of mark-and-sweep collection, reference counts, copying collection, and generational collection in this chapter. This chapter also provides detailed cost analyses and discusses advantages and disadvantages of the different approaches to garbage collection.
Further Reading
-
Apple. Automatic Reference Counting in The Swift Programming Language (Swift 3.0.1)
-
Oracle. Java Garbage Collection Basics.
This tutorial covers the basics of how garbage collection works with the Hotspot JVM. It explains mark-and-sweep, mark-and-compact, and generational collection. It further explains how to monitor the garbage collection process using Visual VM, and which garabage collectors are available in the Java SE 7 Hotspot JVM.
-
Java HotSpot Garbage Collection. In particular: Memory Management Whitepaper