Beyond ByteBuffers
summary
Claims a new foreign-memory API that replaces ByteBuffer for off-heap work, exposing MemorySegment, MemoryAddress and MemoryLayout plus VarHandles to read/write with computed offsets and strides; enforces spatial bounds and temporal (close) checks so bad accesses throw exceptions not segfaults; supports deterministic deallocation via close and try-with-resources, slice/stride conversions to/from ByteBuffer, a concurrent ownership model, and after small JIT fixes attains performance comparable to Unsafe; proposed as an incubating module for Java 14/15.
AI-written summary · about
chapters (5)
- 0:00Start
- 10:45use the native byte order instead of big-endian
- 19:43lay out the equivalent of a simple struct in memory
- 20:30read the data at a certain offset
- 43:57share a buffer between threads
related talks
01h 01mWorking with Memory Outside the Java Heap: Is There a Future for ByteBuffer(s)?
02h 39mMemory API: Patterns, Uses Cases, and Performance
16mForeign Function and Memory API
45mProject Panama - Foreign Function & Memory API
51mNative Interoperability with JDK 25 and the FFM API
47mInterconnecting Java and Native Code with the FFM API
55mBare metal Java
49mWhen a Java Programmer Meets C
