A Healthy diet for your Java application
summary
Diagnoses OutOfMemory by insisting on heap dumps and analyzing GC roots in VisualVM, showing byte[] and object arrays often hold 90%+ of retained size. Finds concrete causes: mutable or wrongly implemented equals/hashCode bug that inflates HashMap keys, non-static inner classes that retain huge outer objects, and thread-local retention that never unset values on pooled threads. Demonstrates fixes and rules, and reports memory drop from ~3.0 GB to ~1.2 GB after cleanup.
AI-written summary · about
chapters (15)
- 0:00Introduction and speaker intro
- 2:14Why care about Java memory
- 5:27Identifying memory problems
- 9:43Measuring and monitoring memory
- 13:36Stack traces vs heap dumps
- 15:01Analyzing heap dumps with VisualVM
- 17:48Static fields and garbage collection
- 22:39Equals and hashCode contract
- 29:20Inner classes and memory leaks
- 33:37Thread locals and memory
- 35:25Memory leaks vs memory footprint
- 40:25Preventing future memory issues
- 44:38Healthy diet summary
- 45:22Outcome of the investigation
- 47:29Q&A session
related talks
45mA Healthy diet for your Java application
43mTroubleshooting Memory Problems in Java Applications
21mMemory Efficient Java
38mMemory Efficient Java
02h 41mSolving Memory Leaks in the JVM
40mSave Java memory
32mMastering JVM Memory Troubleshooting - From OutOfMemoryErrors to Leaks
45mScooby RAM, where are you?
