size = VM_Memory.alignUp(size, BYTES_IN_ADDRESS);
int elemBytes = numElements << logElementSize; if ((elemBytes >>> logElementSize) != numElements) {  failWithOutOfMemoryError(); } int size = VM_Memory.alignUp(elemBytes + headerSize, BYTES_IN_ADDRESS);
  public static Object allocateArray(int numElements, int size, Object [] tib, int allocator)     throws VM_PragmaUninterruptible, VM_PragmaInline {    size = VM_Memory.alignUp(size, BYTES_IN_ADDRESS);    Plan plan = VM_Interface.getPlan();    AllocAdvice advice = plan.getAllocAdvice(null, size, null, null);    VM_Address region = plan.alloc(size, false, allocator, advice);    if (CHECK_MEMORY_IS_ZEROED) VM._assert(Memory.assertIsZeroed(region, size));    Object result = VM_ObjectModel.initializeArray(region, tib, numElements, size);    plan.postAlloc(VM_Magic.objectAsAddress(result), tib, size, false, allocator);    return result;  }