memory and garbage collection
allocation, reachability, and every collector from Serial to generational ZGC.
- 01the JVM's memory mapheap, stacks, metaspace, code cache. what lives where.
- 02allocation and TLABsnew is usually just a pointer bump. here's why it's so fast.
- 03reachabilityGC roots, and soft, weak and phantom references.
- 04how garbage collection worksmark, sweep, compact, copy. and tri-color marking.
- 05generational collectionmost objects die young. eden, survivors, and the old generation.
- 06serial and parallelthe stop-the-world collectors, and when they're still the right call.
- 07G1regions, remembered sets, mixed collections. the default collector.
- 08ZGCcolored pointers and load barriers. sub-millisecond pauses.
- 09Shenandoahconcurrent compaction with forwarding pointers.
- 10choosing a collectorthroughput, latency, footprint. pick two.
- 11reading GC logs-Xlog:gc and what all those numbers mean.
- 12memory leaksyes, java leaks. heap dumps, dominators, and the usual suspects.
- 13native memorythe memory the heap doesn't count. NMT and direct buffers.