Off Heap Memory

Memory outside the Java heap: direct `ByteBuffer` and its Cleaner-driven release, `MemorySegment` and `Arena` in the FFM API, lifetime and thread confinement, when off-heap actually pays, and diagnosing native growth no heap dump explains. Use when RSS grows while the Java heap stays flat, on `OutOfMemoryError: Direct buffer memory` or an OOMKilled container with no Java exception, when `-XX:MaxDirectMemorySize` is unset or copied from another service, when `ByteBuffer.allocateDirect` sits on a per-request path, when `Unsafe.allocateMemory` appears without a matching `freeMemory`, on a `WrongThreadException` from a segment, or on a JEP 498 `sun.misc.Unsafe` runtime warning. Does not cover the six-region container budget and which OOM means what (jvm-memory-regions), calling into native code as opposed to holding native memory (jni-and-ffm), or on-heap retention (heap-dump-analysis).

robsonkades d100213 4 files · 25.8 KB Updated

File contents

robsonkades/agent-skills/tree/main/skills/off-heap-memory commit d100213a97

Frequently asked questions

npx skillmds@latest add robsonkades/off-heap-memory