You set -Xmx256m. Your container has a 512 MB limit. The kernel still SIGKILLs your Spring Boot app — exit code 137, no OutOfMemoryError, no heap dump. This video maps the memory the OS actually sees when it looks at a JVM: anonymous pages holding a whole memory economy the kernel can't read — and exactly why capping the heap doesn't protect you.
What you'll learn:
• What cat /proc/pid/maps shows for a running JVM — and why the OS has never seen a single one of your objects
• RSS vs virtual memory: reservation is nearly free, only touched pages count — and RSS is the only number the OOM killer cares about
• The heap is one tenant: thread stacks (~1 MB × 200 threads), Metaspace (10,000+ classes in a Spring Boot app), the JIT code cache, direct ByteBuffers, GC bookkeeping
• Why -Xmx256m routinely means 400–500+ MB RSS — and how to itemize every byte with NativeMemoryTracking + jcmd VM.native_memory
• Why container-awareness (MaxRAMPercentage, default 25%) still leaves non-heap memory unprotected
• Inside the heap: bump-pointer allocation in eden, why most request objects are already garbage at minor GC, and why your Spring singletons retire to old gen forever
• Exit 137 mechanics: the cgroup limit meters the ENTIRE process RSS, and the kernel kills from outside — no heap dump, mid-request
• The fix: size your container for the whole process — heap, stacks, Metaspace, code cache — not just -Xmx
Chapters:
0:00 Cold open
0:19 The problem
1:12 The naive solution
1:50 How it actually works
3:50 At scale
4:23 Takeaways
Auf dieser Seite können Sie das Online-Video JVM Memory Map: Why Your Heap-Limited Spring Boot App Gets OOM-Killed (Exit 137) mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Visual Computer Science 19 Juli 2026 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 211 Mal angesehen und es wurde von 8 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!