public interface MemoryAllocator<T extends Memory>
Memory allocators handle allocation of memory for io.atomix.storage.buffer.Bytes objects, providing descriptors
that point to memory addresses.
| Modifier and Type | Method and Description |
|---|---|
T |
allocate(int size)
Allocates memory.
|
T |
reallocate(T memory,
int size)
Reallocates the given memory.
|
T allocate(int size)
size - The count of the memory to allocate.T reallocate(T memory, int 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–2018. All rights reserved.