public class RootAllocator extends BaseAllocator
BaseAllocator.Reservation, BaseAllocator.Verbosity
Modifier and Type | Field and Description |
---|---|
protected org.apache.arrow.memory.Accountant |
parent
The parent allocator.
|
protected long |
reservation
The amount of memory reserved for this allocator.
|
DEBUG, DEBUG_ALLOCATOR, DEBUG_LOG_LENGTH, DEFAULT_CONFIG
Constructor and Description |
---|
RootAllocator() |
RootAllocator(AllocationListener listener,
long limit) |
RootAllocator(AllocationListener listener,
long limit,
RoundingPolicy roundingPolicy)
Constructor.
|
RootAllocator(org.apache.arrow.memory.BaseAllocator.Config config) |
RootAllocator(long limit) |
Modifier and Type | Method and Description |
---|---|
long |
getAllocatedMemory()
Return the current amount of allocated memory that this Accountant is managing accounting
for.
|
long |
getHeadroom() |
long |
getInitReservation()
Return the initial reservation.
|
long |
getLimit()
Return the current limit of this Accountant.
|
long |
getPeakMemoryAllocation()
The peak memory allocated by this Accountant.
|
boolean |
isOverLimit() |
void |
releaseBytes(long size) |
void |
setLimit(long newLimit)
Set the maximum amount of memory that can be allocated in the this Accountant before failing
an allocation.
|
void |
verify()
Verify the accounting state of the allocation system.
|
assertOpen, buffer, buffer, close, configBuilder, defaultConfig, getAsByteBufAllocator, getChildAllocators, getEmpty, getName, getParentAllocator, indent, isDebug, newChildAllocator, newChildAllocator, newReservation, nextPowerOfTwo, nextPowerOfTwo, toString, toVerboseString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllocatedMemory, getHeadroom, getInitReservation, getLimit, getPeakMemoryAllocation, isOverLimit, setLimit
protected final org.apache.arrow.memory.Accountant parent
protected final long reservation
public RootAllocator()
public RootAllocator(long limit)
public RootAllocator(AllocationListener listener, long limit)
public RootAllocator(AllocationListener listener, long limit, RoundingPolicy roundingPolicy)
listener
- the allocation listenerlimit
- max allocation size in bytesroundingPolicy
- the policy for rounding the buffer sizepublic RootAllocator(org.apache.arrow.memory.BaseAllocator.Config config)
public void verify()
public void releaseBytes(long size)
public boolean isOverLimit()
public long getLimit()
public long getInitReservation()
public void setLimit(long newLimit)
newLimit
- The limit in bytes.public long getAllocatedMemory()
public long getPeakMemoryAllocation()
public long getHeadroom()
Copyright © 2020 The Apache Software Foundation. All rights reserved.