Foreign Function and Memory API
summary
Shows Java 20’s Foreign Function and Memory API (JEP 434, Project Panama) calling native C and mapping files: uses memory segment and arena primitives, maps a 64 TB sparse file via mmap without crashing the JVM, carves segments from an infinite arena, writes a Hello World that persists on disk, and calls native functions (C time example) with direct Java invocations. Demonstrates safety guarantees (spatial/temporal/thread confinement), atomic allocation counter, and a live integration with Google’s zstd native library that runs successfully.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:20What is Panama
- 1:20Speed
- 1:55C
- 2:17Memory Segment
- 2:50Memory Exception
- 3:24Interoperability
- 4:36Testing
- 5:12Mapping
- 5:57File System
- 6:51Arena
- 7:42Shared Arena
- 8:38Infinite Arena
- 11:09Structure Access
- 12:50Java Class
- 14:00C Utility
related talks
45mProject Panama - Foreign Function & Memory API
01h 01mJava Enable Preview: Foreign Function and Memory Interface
47mInterconnecting Java and Native Code with the FFM API
49mWhen a Java Programmer Meets C
51mNative Interoperability with JDK 25 and the FFM API
29mEasily Leverage Native Functions with Project Panama from Java
55mJava 19 Project Panama 4 Newbies
55mBare metal Java
