~/talk

Interconnecting Java and Native Code with the FFM API

Talkat JavaOne 2025 · 2025-03-18..03-20· [java]
github:minborg
slides:none on file

Shows how Java SE 22’s Foreign Function & Memory API models off‑heap buffers as a memory segment, enforces bounds and deterministic deallocation via arena lifetimes, and describes native functions with var handles and downcall handle descriptors so calling C is pure Java. Demonstrations include invoking getpid, passing C strings, qsort with a Java comparator via a callback, and using jextract to auto‑generate bindings for OpenGL TensorFlow and FFmpeg. Performance equals JNI for calls and often beats JNI for upcalls.

AI-written summary · about

  1. 0:00Introduction to FFM
  2. 2:08JNI limitations
  3. 6:49Memory segments
  4. 10:21Memory safety with arenas
  5. 17:42Memory layouts
  6. 22:38Foreign function API
  7. 25:07Using jextract
  8. 27:57Live coding demonstration
  9. 36:42API evolution
  10. 40:23Summary and Q&A
~/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.