public MemoryResourceImpl(Object arrayData, int length, int elementSize) { super(BYTE_ARRAY_OWNER); this.parent = null; this.data = arrayData; this.size = Extent.fromIntZeroExtend(length * elementSize); this.start = VmMagic.getArrayData(arrayData); this.offset = start.toWord().toOffset(); this.end = start.add(length * elementSize);
private MemoryResourceImpl(MemoryResourceImpl parent, ResourceOwner owner, Address start, Extent size) { super(owner); this.parent = parent; this.start = start; if (parent != null) { this.offset = start.toWord().sub(parent.start.toWord()).toOffset(); } else { this.offset = start.toWord().toOffset(); } this.end = start.add(size); this.size = size;
	public MemoryResourceImpl(Object arrayData, int length, int elementSize) {		super(BYTE_ARRAY_OWNER);		this.parent = null;		this.data = arrayData;		this.size = Extent.fromIntZeroExtend(length * elementSize);		this.start = VmMagic.getArrayData(arrayData);		this.offset = start.toWord().toOffset();		this.end = start.add(length * elementSize);		this.released = false;		this.slotSize = Unsafe.getCurrentProcessor().getArchitecture().getReferenceSize();	}