public interface Allocator
Modifier and Type | Interface and Description |
---|---|
static class |
Allocator.AllocatorOutOfMemoryException |
static interface |
Allocator.BufferObjectFactory |
Modifier and Type | Method and Description |
---|---|
void |
allocateMultiple(MemoryBuffer[] dest,
int size)
Deprecated.
|
void |
allocateMultiple(MemoryBuffer[] dest,
int size,
Allocator.BufferObjectFactory factory)
Allocates multiple buffers of a given size.
|
MemoryBuffer |
createUnallocated()
Deprecated.
|
void |
deallocate(MemoryBuffer buffer)
Deallocates a memory buffer.
|
int |
getMaxAllocation()
Maximum allocation size supported by this allocator.
|
boolean |
isDirectAlloc()
Whether the allocator uses direct buffers.
|
@Deprecated void allocateMultiple(MemoryBuffer[] dest, int size) throws Allocator.AllocatorOutOfMemoryException
dest
- Array where buffers are placed. Objects are reused if already there
(see createUnallocated), created otherwise.size
- Allocation size.Allocator.AllocatorOutOfMemoryException
- Cannot allocate.void allocateMultiple(MemoryBuffer[] dest, int size, Allocator.BufferObjectFactory factory) throws Allocator.AllocatorOutOfMemoryException
dest
- Array where buffers are placed. Objects are reused if already there
(see createUnallocated), created otherwise.size
- Allocation size.factory
- A factory to create the objects in the dest array, if needed.Allocator.AllocatorOutOfMemoryException
- Cannot allocate.@Deprecated MemoryBuffer createUnallocated()
void deallocate(MemoryBuffer buffer)
buffer
- the buffer to deallocateboolean isDirectAlloc()
int getMaxAllocation()
Copyright © 2021 The Apache Software Foundation. All rights reserved.