private static void ReleasePrimitiveArrayCritical(JNIEnvironment env,int arrayJREF,Address arrayCopyAddress,int mode){
  if (traceJNI)   VM.sysWrite("JNI called: ReleasePrimitiveArrayCritical \n");
  RuntimeEntrypoints.checkJNICountDownToGC();
  try {
    VM.enableGC(true);
  }
 catch (  Throwable unexpected) {
    if (traceJNI)     unexpected.printStackTrace(System.err);
    env.recordException(unexpected);
  }
}

private static void ReleasePrimitiveArrayCritical ( JNIEnvironment env , int arrayJREF , Address arrayCopyAddress , int mode ) { if ( traceJNI ) VM . sysWrite ( "JNI called: ReleasePrimitiveArrayCritical \n" ) ; RuntimeEntrypoints . checkJNICountDownToGC ( ) ; try { VM . enableGC ( true ) ; } catch ( Throwable unexpected ) { if ( traceJNI ) unexpected . printStackTrace ( System . err ) ; env . recordException ( unexpected ) ; } }
releaseprimitivearraycritical : this function is intended to be paired with the getprimitivearraycritical function . since the native code has direct access to the array , no copyback update is necessary ; gc is simply reenabled .
