abstract long spill(long size, MemoryConsumer trigger) throws IOException
MemoryConsumer is the contract for memory consumers of
TaskMemoryManager with support for spilling.
MemoryConsumer basically tracks how much memory is allocated.
MemoryConsumer requires a TaskMemoryManager with optional
pageSize and a
If not specified,
used is the amount of memory in use (i.e. allocated) by the
void freeArray(LongArray array)
freeArray deallocates the
protected void freePage(MemoryBlock page)
freePage is a protected method to deallocate the
LongArray allocateArray(long size)
However, if it was not possible to allocate the
size memory, it shows the current memory usage and a
OutOfMemoryError is thrown.
Unable to acquire [required] bytes of memory, got [got]