GC Assertions: Using the Garbage Collector to Check Heap Properties

Date Added: Jun 2009
Format: PDF

This paper introduces GC assertions, a system interface that programmers can use to check for errors, such as data structure invariant violations, and to diagnose performance problems, such as memory leaks. GC assertions are checked by the garbage collector, which is in a unique position to gather information and answer questions about the lifetime and connectivity of objects in the heap. By piggybacking on existing garbage collector computations, the authors' system is able to check heap properties with very low overhead - around 3% of total execution time - low enough for use in a deployed setting. They introduce several kinds of GC assertions and describe how they are implemented in the collector.