Java Garbage Collection - The Basics
summary
Overview of JVM GC basics with concrete mechanics: heap divides into regions (region size ≈ heap/2048 rounded to power of two, e.g. 4MB), young generation uses Eden+two survivor spaces with default tenuring age 15, copying moves live objects between survivor spaces, mark-sweep(-compact) handles long-lived objects. G1GC targets pause-time goals by concurrent marking with SATB snapshot and by cleaning hottest regions first. New collectors: ZGC trades ≤15% throughput for very low pauses, Shenandoah does concurrent compaction, Epsilon is a no-op allocator.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:01Garbage collection overview
- 2:27Collection types explained
- 9:05Object marking patterns
- 13:17Generational GC basics
- 20:57Generational hypothesis
- 27:57G1 GC introduction
- 36:51G1 GC cycle
- 46:50New garbage collectors
- 49:39Q&A and summary
related talks
46mTrash Talk - Exploring the Memory Management in the JVM
52mGarbage collection for the humans
50mTrash Talk - Exploring the JVM memory management
44mThe Fundamentals of Garbage Collector Performance
25mGarbage Collection Primer
01mThe evolution of Garbage Collection Algorithms in Java
01h 01mOpenJDK: In the new age of Concurrent Garbage Collectors
50mTrash Talk - Exploring the JVM memory system
