Compiler Construction bio photo

Compiler Construction

Twitter Github

Edit on GitHub

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

Compiler Construction | Lecture 15 | Memory Management from Eelco Visser

Reading Material

  1. 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

  1. Apple. Automatic Reference Counting in The Swift Programming Language (Swift 3.0.1)

  2. 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.

  3. Java HotSpot Garbage Collection. In particular: Memory Management Whitepaper