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 allocateScalar(int size, Object [] tib, int allocator,                                      int align, int offset)    throws VM_PragmaUninterruptible, VM_PragmaInline {    Plan plan = VM_Interface.getPlan();    // JMTk requires sizes to be multiples of BYTES_IN_PARTICLE.    // Jikes RVM currently already forces scalar sizes to be multiples    // of BYTES_IN_INT. But, if BYTES_IN_PARTICLE > BYTES_IN_INT    // then we have to do round up the allocation request.    int alignedSize = size;    if (BYTES_IN_PARTICLE > BYTES_IN_INT)      alignedSize = VM_Memory.alignUp(size, BYTES_IN_PARTICLE);    int rawSize = (align > BYTES_IN_INT) ? (alignedSize + align) : alignedSize;    AllocAdvice advice = plan.getAllocAdvice(null, rawSize, null, null);    VM_Address region = plan.alloc(rawSize, true, 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.initializeScalar(region, tib, size);    plan.postAlloc(VM_Magic.objectAsAddress(result), tib, rawSize, true,                   allocator);    return result;  }