Part III
MMTk Tutorial
This tutorial will build up a sophisticated garbage collector from scratch, starting with the empty shell that is the NoGC ”collector” in MMTk (collector is a misnomer in this case since NoGC does not collect), and gradually adding functionality.
This tutorial will tell you the mechanics of building a collector in MMTk. It will tell you how but it does not tell you anything about why. The tutorial thus serves two purposes: 1) to give you some insight into the mechanics of MMTk (but not the underlying reasons or design rationale), and 2) show you that the mechanics of building a non-trivial GC in MMTk is not hard, hopefully giving you confidence to start exploring MMTk more deeply.
Please use the latest release to work with the tutorial. If you run into trouble following the instructions, please try again with git HEAD. If the problem persists, please report this as a bug.
18.1 Getting MMTk and Jikes RVM and Eclipse working
18.2 Creating The Base Tutorial Collector
19 Building a Mark-sweep Collector
19.1 Free-list Allocation
19.2 Mark-Sweep Collection
19.3 Optimized Mark-sweep Collection
20 Building a Hybrid Collector
20.1 Add a Copying Nursery
20.2 Add nursery allocation
20.3 Add copying to the collector
20.4 Make necessary changes to TutorialTraceLocal