🔥 Burn Fat Fast. Discover How! 💪

JEP 419: Foreign Function & Memory API is transitioning to Pre | Java Tech News

JEP 419: Foreign Function & Memory API is transitioning to Preview
#jep419 #panama #jni
Panama project have been working on this JEP since Java 14 and now it is going to be released in preview mode in java.base module. The idea is to replace existing JNI with more safe and intuitive API that runs code and uses shared memory outside of JVM.

Why it's important?
Lot's of low-level APIs are written with the use of off-heap memory and kernel calls: JDBC, HTTP clients, NIO channels, local sockets.
• Libraries like Tensorflow, Ignite, Lucene, and Netty are using off-heap data instead of unpredictable garbage collected memory
• Unix system call mmap can be used for serialization/deserialization, but today's JVM has limitation for its usage
• JNI outlived itself. Java need to keep up with other langs that offer first-class native interoperation. Java developers need a simple-designed way to use native libraries in a platform-agnostic way.
mail.openjdk.java.net/pipermail/panama-dev/2021-December/015895.html