Memory
Heap, direct buffers, Metaspace, code cache and native memory: where a JVM's footprint goes and how to find a leak.
- GC roots and Java memory leaks: why unreachable is the only thing that gets freed
How the garbage collector decides what is alive, the kinds of GC roots, the leak patterns that keep objects reachable by accident, and how to trace a leak back to its root.
- Metaspace explained: OutOfMemoryError: Metaspace, class loader leaks and sizing
What Metaspace stores, how MaxMetaspaceSize, MetaspaceSize and the compressed class space work, how to monitor class metadata with jcmd VM.metaspace and jstat, and how to find the class loader that leaks.
- Native Memory Tracking: why your JVM uses more memory than -Xmx
How to enable HotSpot Native Memory Tracking, read jcmd VM.native_memory summaries, use baselines and diffs to find growth, and what NMT cannot see: native libraries, malloc arenas and the gap between committed memory and RSS.
- OutOfMemoryError: Direct buffer memory and MaxDirectMemorySize
What the JVM's direct buffer limit is, how the default is chosen, why the error appears while the heap looks healthy, and how to measure, size and fix direct memory use.
- Taking and reading a Java heap dump: jcmd, jmap, HeapDumpOnOutOfMemoryError and Eclipse MAT
How to capture a heap dump safely in production, what it costs, how to get one automatically on OutOfMemoryError, and how to read it with Eclipse Memory Analyzer: histogram, dominator tree, retained size and paths to GC roots.
- The AI memory squeeze: DRAM prices, cloud costs and what it changes for JVM teams
How AI datacentre demand for HBM and server DRAM drove memory contract and spot prices up in 2025 and 2026, what memory costs on AWS, Google Cloud and Azure instances, and how JVM teams can need fewer gigabytes: heap sizing, container limits, off-heap caps, compact object headers, CDS, GC choice and NMT.
- The JIT code cache: ReservedCodeCacheSize and 'CodeCache is full'
What the HotSpot code cache stores, its default size with and without tiered compilation, the segmented code cache, how to monitor it and when raising ReservedCodeCacheSize is the right fix.






