private int allocateFast(MemoryBuffer[] dest, long[] destHeaders, int destIx, int destCount,
      int freeListIx, int allocSize, int startArenaIx, int arenaCount) {
    int index = startArenaIx;
    do {
      int newDestIx = arenas[index].allocateFast(
          freeListIx, dest, destHeaders, destIx, destCount, allocSize);
      if (newDestIx == destCount) return newDestIx;
      assert newDestIx != -1;
      destIx = newDestIx;
      index = getNextIx(index, arenaCount, 1);
    } while (index != startArenaIx);
    return destIx;
  }
Tries to allocate destCount - destIx blocks, using best-effort fast allocation.
@param dest Option 1 - memory allocated is stored in these buffers.
@param destHeaders Option 2 - memory allocated is reserved and headers returned via this.
@param destIx The start index in either array where allocations are to be saved.
@param destCount The end index in either array where allocations are to be saved.
@param freeListIx The free list from which to allocate.
@param allocSize Allocation size.
@param startArenaIx From which arena to start allocating.
@param arenaCount The active arena count.
@return The index in the array until which the memory has been allocated.
llap-server/src/java/org/apache/hadoop/hive/llap/cache/BuddyAllocator.java