Leveraging the Default G1 Garbage Collector

In the previous chapter, we examined Java Shell (JShell), Java's Read-Eval-Print Loop (REPL) command-line tool. We started with introductory information regarding the tool and looked closely at the REPL concept. We spent considerable time reviewing JShell commands and command-line options. Our coverage included practical guides to feedback modes, asset listing, and editing in the shell. We also gained experience working with scripts.

In this chapter, we will take an in-depth look at garbage collection and how it is handled in Java. We will start with an overview of garbage collection and then look at specifics in the pre-Java 9 realm. Armed with that foundational information, we will look at specific garbage collection changes in the Java 9 platform. Lastly, we will look at some garbage collection issues that persist, even after Java 11.

The following topics are covered in this chapter:

  • Overview of garbage collection
  • The pre-Java 9 garbage collection schema
  • Collecting garbage with the new Java platform
  • Persistent issues
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset