public class DirectMemoryAllocator extends Object implements MemoryAllocator<NativeMemory>
| Constructor and Description |
|---|
DirectMemoryAllocator() |
| Modifier and Type | Method and Description |
|---|---|
DirectMemory |
allocate(long size)
Allocates memory.
|
DirectMemory |
reallocate(NativeMemory memory,
long size)
Reallocates the given memory.
|
public DirectMemory allocate(long size)
MemoryAllocatorallocate in interface MemoryAllocator<NativeMemory>size - The count of the memory to allocate.public DirectMemory reallocate(NativeMemory memory, long size)
MemoryAllocator
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.
reallocate in interface MemoryAllocator<NativeMemory>memory - The memory to reallocate.size - The count to which to reallocate the given memory.Copyright © 2013–2015. All rights reserved.