Gc Fundamentals

How JVM garbage collectors work, as the mental model behind every GC diagnosis: the generational hypothesis and where it fails, mark-sweep versus mark-compact versus copying, how survivors, allocation and roots affect collection cost, write barriers, safepoints and Time-To-SafePoint, and the JDK 25 collector landscape. Use when explaining why a collection is expensive, when the reported pause does not match the latency the client feels, when a young pause is long although little survived, when a cache or pool breaks the generational assumption, when humongous allocations appear, or when comparing collectors written before JDK 23. Does not cover choosing a collector or sizing the heap (jvm-gc-tuning), parsing the log (gc-log-analysis), or the non-heap regions (jvm-memory-regions). Per-collector internals are g1-internals and zgc-and-shenandoah, and the safepoint mechanism is safepoints.

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/gc-fundamentals commit c08b9a4ac7

Frequently asked questions

npx skillmds@latest add robsonkades/gc-fundamentals