int ptr = bootImage.allocateStorage(size, align, offset); int ref = VM_JavaHeader.initializeArrayHeader(bootImage, ptr, tib, size); bootImage.setFullWord(ref + getArrayLengthOffset().toInt(), numElements);
Offset ptr = bootImage.allocateStorage(size, align, offset); Offset ref = VM_JavaHeader.initializeArrayHeader(bootImage, ptr, tib, size); bootImage.setFullWord(ref.add(getArrayLengthOffset()), numElements);
  public static int allocateArray(BootImageInterface bootImage,                                   VM_Array array,                                  int numElements) throws InterruptiblePragma {    Object[] tib = array.getTypeInformationBlock();    int size = array.getInstanceSize(numElements);    int align = getAlignment(array);    int offset = getOffsetForAlignment(array);    int ptr = bootImage.allocateStorage(size, align, offset);    int ref = VM_JavaHeader.initializeArrayHeader(bootImage, ptr, tib, size);    bootImage.setFullWord(ref + getArrayLengthOffset().toInt(), numElements);    VM_AllocatorHeader.initializeHeader(bootImage, ref, tib, size, false);    VM_MiscHeader.initializeHeader(bootImage, ref, tib, size, false);    return ref;  }