Zooming in on the Metaspace
In Chapter 4, we examined garbage collection in detail. We discovered that objects without a reference are eligible for garbage collection. In effect, the garbage collector marks the objects that have a connection back to the stack, annotating them as live objects. The sweep phase of the garbage collector then reclaims the memory of the objects that are not marked (the dead objects).
We also examined the various garbage collection implementations. Based on your specific criteria, an evaluation of each implementation is required.
This chapter focuses on an area known as the Metaspace. We will examine the Metaspace under the following headings:
- JVM usage of the Metaspace
- Class loading
- Releasing Metaspace memory
Let us start with the JVM usage of the Metaspace.