if (align > BYTES_IN_INT) region = alignAllocation(region, align, offset);
if (align > BYTES_IN_INT) { VM_Word mask  = VM_Word.fromIntSignExtend(align-1); VM_Word negOff= VM_Word.fromIntSignExtend(-offset); VM_Offset delta = negOff.sub(region.toWord()).and(mask).toOffset(); region = region.add(delta); rawSize -= delta.toInt(); }
  public static Object allocateArray(int numElements, int logElementSize,                                      int headerSize, Object [] tib,                                     int allocator,                                     int align, int offset)     throws VM_PragmaUninterruptible, VM_PragmaInline {    int elemBytes = numElements << logElementSize;    if ((elemBytes >>> logElementSize) != numElements) {      // asked to allocate more than Integer.MAX_VALUE bytes      VM_Interface.failWithOutOfMemoryError();    }    // JMTk requires sizes to be multiples of BYTES_IN_PARTICLES.    // Jikes RVM does not ensure this for arrays, so we must round up here.    int size = VM_Memory.alignUp(elemBytes + headerSize, BYTES_IN_PARTICLE);    int rawSize = (align > BYTES_IN_INT) ? (size + align) : size;    Plan plan = VM_Interface.getPlan();    AllocAdvice advice = plan.getAllocAdvice(null, rawSize, null, null);    VM_Address region = plan.alloc(rawSize, false, allocator, advice);    if (CHECK_MEMORY_IS_ZEROED) Memory.assertIsZeroed(region, rawSize);    if (align > BYTES_IN_INT) region = alignAllocation(region, align, offset);    Object result = VM_ObjectModel.initializeArray(region, tib, numElements,                                                   size);    plan.postAlloc(VM_Magic.objectAsAddress(result), tib, rawSize, false,                   allocator);    return result;  }