if (GC_TRIGGERGC)
if (VM.verboseGC)
  cloneScalar (int size, Object[] tib, Object cloneSrc)    throws OutOfMemoryError  {  int objaddr;  if (DebugLink) VM_Scheduler.trace("cloneScalar", "called");  if (GC_COUNT_FAST_ALLOC) allocCount++;  VM_Processor st = VM_Processor.getCurrentProcessor();  if (size <= GC_MAX_SMALL_SIZE) {    VM_SizeControl  the_size  = st.GC_INDEX_ARRAY[size];    if (the_size.next_slot != 0) {  // fastest path      objaddr = the_size.next_slot;    if (DebugLink) {      if (!isValidSmallHeapPtr(objaddr)) VM.sysFail("Bad ptr");      if (!isPtrInBlock(objaddr, the_size)) VM.sysFail("Pointer out of block");    }    the_size.next_slot = VM_Magic.getMemoryWord(objaddr);    if (DebugLink && (the_size.next_slot != 0)) {      if (!isValidSmallHeapPtr(the_size.next_slot)) VM.sysFail("Bad ptr");      if (!isPtrInBlock(the_size.next_slot, the_size)) VM.sysFail("Pointer out of block");    }              VM_Magic.setMemoryWord(objaddr, 0);    objaddr += size - OBJECT_ADDR_POSITION;    VM_Magic.setMemoryWord(objaddr + OBJECT_TIB_OFFSET,      VM_Magic.objectAsAddress(tib));    if (cloneSrc != null) {      int cnt = size - SCALAR_HEADER_SIZE;      int src = VM_Magic.objectAsAddress(cloneSrc) + OBJECT_HEADER_OFFSET - cnt;      int dst = objaddr + OBJECT_HEADER_OFFSET - cnt;      VM_Memory.aligned32Copy(dst, src, cnt);     }    return VM_Magic.addressAsObject(objaddr);  }  else objaddr = allocatex(the_size, tib, size, the_size.ndx);  if (objaddr == 0) {    if (GC_TRIGGERGC)       VM_Scheduler.trace(" gc collection triggered by small scalarclone request", "XX");    gc1();    // reset the_size in case we are on a different processor after GC    st = VM_Processor.getCurrentProcessor();    the_size  = st.GC_INDEX_ARRAY[size];		if (DEBUG_FREE) if (the_size.current_block != the_size.first_block) {			VM_Scheduler.trace(" After gc, current_block not reset ", "ASC1", the_size.ndx);		}  }  else {    if (cloneSrc != null) {      int cnt = size - SCALAR_HEADER_SIZE;      int src = VM_Magic.objectAsAddress(cloneSrc) + OBJECT_HEADER_OFFSET - cnt;      int dst = objaddr + OBJECT_HEADER_OFFSET - cnt;      VM_Memory.aligned32Copy(dst, src, cnt);     }    return VM_Magic.addressAsObject(objaddr);  }	// Be prepared to do repeated gcs - see comment in allScalar1()  while (true) {  // try fast path again  if (the_size.next_slot != 0) {  // fastest path    objaddr = the_size.next_slot;    if (DebugLink) {      if (!isValidSmallHeapPtr(objaddr)) VM.sysFail("Bad ptr");      if (!isPtrInBlock(objaddr, the_size)) VM.sysFail("Pointer out of block");    }    the_size.next_slot = VM_Magic.getMemoryWord(objaddr);    if (DebugLink && (the_size.next_slot != 0)) {      if (!isValidSmallHeapPtr(the_size.next_slot)) VM.sysFail("Bad ptr");      if (!isPtrInBlock(the_size.next_slot, the_size)) VM.sysFail("Pointer out of block");    }    // VM_Memory.zero(objaddr, objaddr + size);     VM_Magic.setMemoryWord(objaddr, 0);    objaddr += size - OBJECT_ADDR_POSITION;    VM_Magic.setMemoryWord(objaddr + OBJECT_TIB_OFFSET, VM_Magic.objectAsAddress(tib));    if (cloneSrc != null) {      int cnt = size - SCALAR_HEADER_SIZE;      int src = VM_Magic.objectAsAddress(cloneSrc) + OBJECT_HEADER_OFFSET - cnt;      int dst = objaddr + OBJECT_HEADER_OFFSET - cnt;      VM_Memory.aligned32Copy(dst, src, cnt);     }    return VM_Magic.addressAsObject(objaddr);  }  else objaddr = allocatex(the_size, tib, size, the_size.ndx);  if (objaddr == 0) {    // failure    if (GC_TRIGGERGC)       VM_Scheduler.trace(" 2nd gc collection trigg. by small scalar request \n", "CL", size);		flag2nd = true;    gc1();    // reset the_size in case we are on a different processor after GC    st = VM_Processor.getCurrentProcessor();    the_size  = st.GC_INDEX_ARRAY[size];  }  else break;  }  // gc succeeded so proceed    if (cloneSrc != null) {      int cnt = size - SCALAR_HEADER_SIZE;      int src = VM_Magic.objectAsAddress(cloneSrc) + OBJECT_HEADER_OFFSET - cnt;      int dst = objaddr + OBJECT_HEADER_OFFSET - cnt;      VM_Memory.aligned32Copy(dst, src, cnt);     }    return VM_Magic.addressAsObject(objaddr);  }  // a large object is requested: use old code  objaddr = getlargeobj(size);                // address of new object  if (objaddr < 0) {    if (GC_TRIGGERGC)      VM_Scheduler.trace(" gc collection triggered by large scalar request \n", "XX");    gc1();    objaddr = getlargeobj(size);		// TODO - fix for repeated gcs    if (objaddr < 0) {			outOfMemory(size, 4300);      // outOfMemory does not return: following line is for compilation      return VM_Magic.addressAsObject(objaddr);    }  }  objaddr += size - OBJECT_ADDR_POSITION;  int tibAddr = VM_Magic.objectAsAddress(tib);  // set header pointer to VMT  //  VM_Magic.setMemoryWord(objaddr + OBJECT_TIB_OFFSET, tibAddr);  VM_Magic.setMemoryWord(objaddr + OBJECT_STATUS_OFFSET, 0);  if (cloneSrc != null) {    int cnt = size - SCALAR_HEADER_SIZE;    int src = VM_Magic.objectAsAddress(cloneSrc) + OBJECT_HEADER_OFFSET - cnt;    int dst = objaddr + OBJECT_HEADER_OFFSET - cnt;    VM_Memory.aligned32Copy(dst, src, cnt);   }  else VM_Memory.zero(objaddr - (size - OBJECT_ADDR_POSITION),   objaddr - (size - OBJECT_ADDR_POSITION) + size);  return VM_Magic.addressAsObject(objaddr);  }