private static Address GetStringUTFChars(JNIEnvironment env,int strJREF,Address isCopyAddress){
  if (traceJNI)   VM.sysWrite("JNI called: GetStringUTFChars  \n");
  RuntimeEntrypoints.checkJNICountDownToGC();
  String str=(String)env.getJNIRef(strJREF);
  if (str == null) {
    return Address.zero();
  }
  int len=UTF8Convert.utfLength(str) + 1;
  Address copyBuffer=sysCall.sysMalloc(len);
  if (copyBuffer.isZero()) {
    env.recordException(new OutOfMemoryError());
    return Address.zero();
  }
  try {
    JNIGenericHelpers.createUTFForCFromString(str,copyBuffer,len);
    JNIGenericHelpers.setBoolStar(isCopyAddress,true);
    return copyBuffer;
  }
 catch (  Throwable unexpected) {
    if (traceJNI)     unexpected.printStackTrace(System.err);
    env.recordException(unexpected);
    return Address.zero();
  }
}

private static Address GetStringUTFChars ( JNIEnvironment env , int strJREF , Address isCopyAddress ) { if ( traceJNI ) VM . sysWrite ( "JNI called: GetStringUTFChars  \n" ) ; RuntimeEntrypoints . checkJNICountDownToGC ( ) ; String str = ( String ) env . getJNIRef ( strJREF ) ; if ( str == null ) { return Address . zero ( ) ; } int len = UTF8Convert . utfLength ( str ) + 1 ; Address copyBuffer = sysCall . sysMalloc ( len ) ; if ( copyBuffer . isZero ( ) ) { env . recordException ( new OutOfMemoryError ( ) ) ; return Address . zero ( ) ; } try { JNIGenericHelpers . createUTFForCFromString ( str , copyBuffer , len ) ; JNIGenericHelpers . setBoolStar ( isCopyAddress , true ) ; return copyBuffer ; } catch ( Throwable unexpected ) { if ( traceJNI ) unexpected . printStackTrace ( System . err ) ; env . recordException ( unexpected ) ; return Address . zero ( ) ; } }
getstringutfchars : return address of buffer containing contents of a string
