ABSTRACT

We have discussed garbage collection (GC) algorithms and the concept of GC safepoint. In this chapter, we discuss the supports virtual machine (VM) provides to garbage collection.

9.1 WHY GC SUPPORT e main task to support GC in Java code is for the just-in-time (JIT) compiler to generate safepoints. Safepoints may include the following sites. ey can trigger a collection, block the thread execution, or lead to long-time execution. For each safepoint, a GC-map data structure is needed to support root-set enumeration. It stores information about which locations in the execution context contain references.