Heap Memory Area and Size Control

This chapter provides tutorial notes and example codes on heap memory area. Topics include OutOfMemoryError exception; Heap memory area allocation limits; OutOfMemoryError comparison of HotSpot and JRockit.

Java Exception: "java.lang.OutOfMemoryError: Java heap space"

Memory Allocation Limits on Windows Systems

OutOfMemoryError Comparison of HotSpot and JRockit

Takeaways:

Table of Contents

 About This Book

Heap Memory Area and Size Control

 JVM Garbage Collection Logging

 Introduction of Garbage Collectors

 Serial Collector - "+XX:+UseSerialGC"

 Parallel Collector - "+XX:+UseParallelGC"

 Concurrent Mark-Sweep (CMS) Collector - "+XX:+UseConcMarkSweepGC"

 Garbage First (G1) Collector - "+XX:+UseG1GC"

 The Z Garbage Collector (ZGC) - "+XX:+UseZGC"

 Object References and Garbage Collection

 Garbage Collection Performance Test Program

 Performance Tests on Serial Collector

 Performance Tests on Parallel collector

 Performance Tests on Concurrent collector

 Performance Tests on G1 collector

 Garbage Collection Performance Test Summary

 References

 Full Version in PDF/EPUB