The HotSpot JVM currently has feature for native calls that passes elements of a primitive array to a native function if it finds an entry point for that native function that is prefixed with JavaCritical_.
No JDK code currently uses this feature since it is not officially supported, but it may be used in some experimental and external code to improve performance.
We would like to deprecate this feature, but recognize that this may be a useful optimization for performance of native calls. 
A suggested Panama replacement could be code that adds a "pin" method to MemorySegment (see comment), or some other marker, that avoids the copy to native memory then calls the function as a trivial function, like:
func_trivial = abi.downcallHandle(addr, mt, fd.withAttribute(FunctionDescriptor.TRIVIAL_ATTRIBUTE_NAME, true));