public interface MemoryAllocator<T extends Memory>
Memory allocators handle allocation of memory for Bytes objects, providing descriptors
that point to memory addresses.
| Modifier and Type | Method and Description |
|---|---|
T |
allocate(long size)
Allocates memory.
|
T |
reallocate(T memory,
long size)
Reallocates the given memory.
|
T allocate(long size)
size - The count of the memory to allocate.T reallocate(T memory, long size)
When the memory is reallocated, the memory address for the given Memory instance may change. The returned
Memory instance will contain the updated address and count.
memory - The memory to reallocate.size - The count to which to reallocate the given memory.Copyright © 2013–2015. All rights reserved.