Package org.apache.arrow.memory.netty
Class NettyAllocationManager
java.lang.Object
org.apache.arrow.memory.AllocationManager
org.apache.arrow.memory.netty.NettyAllocationManager
The default implementation of
AllocationManager
. The implementation is responsible for
managing when memory is allocated and returned to the Netty-based PooledByteBufAllocatorL.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.arrow.memory.AllocationManager
AllocationManager.Factory
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default cut-off value for switching allocation strategies.static final AllocationManager.Factory
-
Method Summary
-
Field Details
-
FACTORY
-
DEFAULT_ALLOCATION_CUTOFF_VALUE
public static final int DEFAULT_ALLOCATION_CUTOFF_VALUEThe default cut-off value for switching allocation strategies. If the request size is not greater than the cut-off value, we will allocate memory byPooledByteBufAllocatorL
APIs, otherwise, we will usePlatformDependent
APIs.- See Also:
-
-
Method Details
-
memoryAddress
protected long memoryAddress()Description copied from class:AllocationManager
Return the absolute memory address pointing to the fist byte of underlying memory chunk.- Specified by:
memoryAddress
in classAllocationManager
-
release0
protected void release0()Description copied from class:AllocationManager
Release the underlying memory chunk.- Specified by:
release0
in classAllocationManager
-
getSize
public long getSize()Returns the underlying memory chunk size managed.NettyAllocationManager rounds requested size up to the next power of two.
- Specified by:
getSize
in classAllocationManager
- Returns:
- size of underlying memory chunk
-