After its review concluded, JEP 423, Region Pinning for G1, has been Integrated into JDK 22. This JEP proposes to reduce GC latency by implementing region pinning for the G1 garbage collector. This will extend G1 so that arbitrary regions may be pinned during major and minor collection operations, and disabling the garbage collection process while implementing JNI critical regions may be avoided.
JEP 423 addresses a longstanding challenge to Java’s interoperability with unmanaged languages such as C and C++. JNI, a critical component for this interoperability, allows Java applications to call and be called by native applications and libraries written in other languages. It provides functions to get and release direct pointers to Java objects, which must be used in pairs.