if (verboseJNI) VM.sysWrite("JNI called: ReleaseDoubleArrayElements  \n");
if (traceJNI) VM.sysWrite("JNI called: ReleaseDoubleArrayElements  \n");
  private static void ReleaseDoubleArrayElements(int envJREF, int arrayJREF, VM_Address copyBufferAddress,                                                  int releaseMode) {    if (verboseJNI) VM.sysWrite("JNI called: ReleaseDoubleArrayElements  \n");    VM_JNIEnvironment env;    try {      env = VM_Thread.getCurrentThread().getJNIEnv();      double sourceArray[] = (double []) env.getJNIRef(arrayJREF);      // If a direct pointer was given to the user, no need to update or release      if (VM_Magic.objectAsAddress(sourceArray)==copyBufferAddress)        return;      int size = sourceArray.length;      // mode 0 and mode 1:  copy back the buffer      if (releaseMode== 0 || releaseMode== 1) {        VM_Memory.memcopy( VM_Magic.objectAsAddress(sourceArray), copyBufferAddress, size*8 );      }       // mode 0 and mode 2:  free the buffer      if (releaseMode== 0 || releaseMode== 2) {        VM.sysCall1(VM_BootRecord.the_boot_record.sysFreeIP, copyBufferAddress.toInt());      }    } catch (Throwable unexpected) {      env = VM_Thread.getCurrentThread().getJNIEnv();      env.recordException(unexpected);      return;    }  }