private void growCapacity(IExtraPageBlockHelper extraPageBlockHelper, IBufferCache bufferCache, int deltaPages)
throws HyracksDataException {
int framePagesOld = page.getFrameSizeMultiplier();
int newMultiplier = framePagesOld + deltaPages;
int oldSlotEnd = slotManager.getSlotEndOff();
int oldSlotStart = slotManager.getSlotStartOff() + slotManager.getSlotSize();
bufferCache.resizePage(getPage(), newMultiplier, extraPageBlockHelper);
buf = getPage().getBuffer();
System.arraycopy(buf.array(), oldSlotEnd, buf.array(), slotManager.getSlotEndOff(), oldSlotStart - oldSlotEnd);
buf.putInt(TOTAL_FREE_SPACE_OFFSET,
buf.getInt(TOTAL_FREE_SPACE_OFFSET) + (bufferCache.getPageSize() * deltaPages));
}