
- Java 12 Tutorial
- Java 12 - Home
- Java 12 - Overview
- Java 12 - Environment Setup
- Java 12 - Switch Expressions
- Java 12 - File mismatch method
- Java 12 - Compact Number Formatting
- Java 12 - Teeing Collectors
- Java 12 - String methods
- Garbage Collection Enhancements
- Java 12 - Microbenchmark
- Java Tutorial
- Java 8 Tutorial
- Java 9 Tutorial
- Java 10 Tutorial
- Java 11 Tutorial
- Java 12 Useful Resources
- Java 12 - Quick Guide
- Java 12 - Useful Resources
- Java 12 - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Java 12 - Garbage Collection Enhancements
Java 12 introduces multiple enhancements to its garbage collection algorithms.
JEP 189 – Shenandoah: A Low-Pause-Time Garbage Collector (Experimental)
An experimental Low-Pause-Time Garbage Collector, Shenandoah is introduced to reduce the GC pause time. It works in parallel with running java threads. This helps to reduce the dependency of GC over heap size and makes it consistent. Now Garbage collection pause time would be similar for 2 MB as well as for 2 GB heap sapce.
Shenandoah is expected to be part of main JAVA release with Java 15.
JEP 346 – Promptly Return Unused Committed Memory
With Java 12, G1 will process java heap space if application is inactive and may release the memory to operating system. This preemtive behavior conserve and free memory.
JEP 344 : Abortable Mixed Collections
With Java 12, G1 efficiency has been improved. Now G1 mixed collections are abortable if they exceed the define pause limit. Now mixed collections are spilt into mandatory and optional. G1 collector can prioritize the mandatory sets to be check the pause time goal.