public interface Allocator
Modifier and Type | Interface and Description |
---|---|
static class |
Allocator.AllocatorOutOfMemoryException |
Modifier and Type | Method and Description |
---|---|
void |
allocateMultiple(MemoryBuffer[] dest,
int size)
Allocates multiple buffers of a given size.
|
MemoryBuffer |
createUnallocated()
Creates an unallocated memory buffer object.
|
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.
|
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.MemoryBuffer createUnallocated()
void deallocate(MemoryBuffer buffer)
boolean isDirectAlloc()
int getMaxAllocation()
Copyright © 2016 The Apache Software Foundation. All rights reserved.