This chapter deals with managing the memory of your Java application. Understanding the garbage collection process is crucial to developing memory-efficient applications. We will introduce you to the garbage collection algorithm being used in Java 9. Then, we will introduce you to some new features of Java 9, which help in advanced application diagnostics. We'll also show you how to manage the resources by using the new try with resources construct. Later, we'll show you the new stack walking API introduced in Java 9. Тhe following recipes will be covered:
- Understanding the G1 garbage collector
- Unified logging for JVM
- Using the new diagnostic commands for the JVM
- Try with resources for better resource handling ...