Package org.apache.arrow.memory
Class ForeignAllocation
java.lang.Object
org.apache.arrow.memory.ForeignAllocation
EXPERIMENTAL: a memory allocation that does not come from a BufferAllocator, but rather an
outside source (like JNI).
To use this, subclass this class and implement release0()
to free the allocation.
-
Constructor Summary
ModifierConstructorDescriptionprotected
ForeignAllocation
(long size, long memoryAddress) Create a new AllocationManager representing an imported buffer. -
Method Summary
-
Constructor Details
-
ForeignAllocation
protected ForeignAllocation(long size, long memoryAddress) Create a new AllocationManager representing an imported buffer.- Parameters:
size
- The buffer size.memoryAddress
- The buffer address.
-
-
Method Details
-
getSize
public long getSize()Get the size of this allocation. -
memoryAddress
protected long memoryAddress()Get the address of this allocation. -
release0
protected abstract void release0()Free this allocation. Will only be called once.
-