~/talk

Memory API: Patterns, Uses Cases, and Performance

Talkat Devoxx Belgium 2024 · 2024-10-07..10-11· [java]
slides:none on file

The Memory API (final in Java SE 22) shows concrete replacements for ByteBuffer: MemorySegments and Arenas give explicit allocation and deallocation semantics (close an arena to free all segments), preventing the unpredictable unmap/GC problem; MemoryLayout + Jextract maps C structs into Java layouts; VarHandles deliver near-unsafe speed for struct access. A demo loads 1 billion elements (ID, temperature) from a binary file—one layout scans in ~3–6s, a reorganized layout under 1s—showing fragmentation, confined vs shared arena costs, and that the approach actually works.

AI-written summary · about

  1. 0:00Introduction to Memory API
  2. 12:37Goals of Panama project
  3. 20:55ByteBuffer API issues
  4. 31:59Memory Access API overview
  5. 48:43Arena object explained
  6. 1:12:48Coffee break
  7. 1:33:52Memory segment access patterns
  8. 1:57:26Memory integrity and safety
  9. 2:01:11Memory layout API
  10. 2:29:42VAR handles and VLEs
  11. 2:34:01Future of Memory API
  12. 2:38:03Q&A and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.