if (verboseJNI) VM.sysWrite("JNI called: ReleaseBooleanArrayElements  \n");
if (traceJNI) VM.sysWrite("JNI called: ReleaseBooleanArrayElements  \n");
  private static void ReleaseBooleanArrayElements(int envJREF, int arrayJREF, VM_Address copyBufferAddress,                                                   int releaseMode) {    if (verboseJNI) VM.sysWrite("JNI called: ReleaseBooleanArrayElements  \n");    VM_JNIEnvironment env;    try {      env = VM_Thread.getCurrentThread().getJNIEnv();      boolean sourceArray[] = (boolean []) env.getJNIRef(arrayJREF);      // If a direct pointer was given to the user, no need to update or release      if (VM_Magic.objectAsAddress(sourceArray).EQ(copyBufferAddress))        return;      int size = sourceArray.length;      // mode 0 and mode 1:  copy back the buffer      if ((releaseMode== 0 || releaseMode== 1) && size!=0) {        for (int i=0; i<size; i+= 4) {          VM_Address addr = copyBufferAddress.add(i);          int data = VM_Magic.getMemoryWord(addr);          if (LittleEndian) {            if (i<size)               sourceArray[i]   = ((data)        & 0x000000ff) == 0 ? false : true;            if (i+1<size) 		    	                       sourceArray[i+1] = ((data >>> 8)  & 0x000000ff) == 0 ? false : true;            if (i+2<size) 		    	                       sourceArray[i+2] = ((data >>> 16) & 0x000000ff) == 0 ? false : true;            if (i+3<size) 		    	                               sourceArray[i+3] = ((data >>> 24) & 0x000000ff) == 0 ? false : true;          } else {            if (i<size)               sourceArray[i]   = ((data >>> 24) & 0x000000ff) == 0 ? false : true;            if (i+1<size) 		    	                       sourceArray[i+1] = ((data >>> 16) & 0x000000ff) == 0 ? false : true;            if (i+2<size) 		    	                       sourceArray[i+2] = ((data >>> 8)  & 0x000000ff) == 0 ? false : true;            if (i+3<size) 		    	                               sourceArray[i+3] = ((data)        & 0x000000ff) == 0 ? false : true;          }        }      }       // 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;    }  }