Foreign Function & Memory API (FFM API), финализированный в Java 22 в рамках Project Panama, является современной заменой JNI. Он позволяет Java-коду вызывать нативные функции и безопасно выделять нативную память — полностью на чистой Java, без написания ни строчки C. Три ключевые абстракции: MemorySegment (область памяти), Arena (менеджер её времени жизни) и MethodHandle (вызываемая ссылка на нативную функцию).

Основные типы FFM API
Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.