Solving Memory Leaks in the JVM
summary
Shows how a JVM leak looks in logs and in practice: GC logging and VisualVM reveal heap occupancy rising (one example loses ~1 GB/day), allocation profiling uses jcmd / jmap and the JFluid generational counts technique to pin the leaking class, and heap analysis with heap dump + dominator tree (MAT/LeakSuspects) exposes a static collection-of-collections holding thousands of objects. A demo reproduces the bug (30 GB heap tools took ~2 hours), a code fix moves loading off the per-request path, and postfix testing confirms the leak stops.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 0:28Inspiration
- 2:17Technology
- 3:52Memory Leak
- 5:07Unmanaged Memory
- 5:36Native Memory Leak
- 6:52Java Heap
- 7:42On Demand Allocation
- 8:42Heap Allocation
- 12:47String Class
- 14:47Object Header
- 18:57Scan for Routes
- 21:47Memory Leaks
- 32:37Testing
- 39:07Manage Memory Revisited
- 40:02Hines Memory Leaks
- 44:32JMap with Histogram
- 45:44JMap with Leaks
- 46:17J Command Help
- 46:52Character Array
- 47:20Memory Leak Class
- 48:51Diagnostic Mechanism
- 49:51Test
- 50:50Questions
- 57:47Anatomy of a leak
related talks
43mTroubleshooting Memory Problems in Java Applications
32mMastering JVM Memory Troubleshooting - From OutOfMemoryErrors to Leaks
51mA Healthy diet for your Java application
38mMemory Efficient Java
26mFind Java memory leaks with Heap Dumps (JDK 25)
47mManaging and monitoring a JVM
21mMemory Efficient Java
46mPlumbing memory leaks in Java
