public interface MemoryRequest
| Modifier and Type | Method and Description |
|---|---|
void |
free(Memory mem)
The given Memory with its capacity is to be freed
|
void |
free(Memory memToFree,
Memory newMem)
The given memToFree with its capacity is to be freed.
|
Memory |
request(long capacityBytes)
Request new Memory with the given capacity.
|
Memory |
request(Memory origMem,
long copyToBytes,
long capacityBytes)
Request for allocate, copy and clear.
|
Memory request(long capacityBytes)
capacityBytes - The capacity being requestedMemory request(Memory origMem, long copyToBytes, long capacityBytes)
Request to allocate new Memory with the capacityBytes; copy the contents of origMem from zero to copyToBytes; clear the new memory from copyToBytes to capacityBytes.
origMem - The original Memory, a portion of which will be copied to the
newly allocated Memory.
The reference must not be null.
This origMem is not modified in any way, may be reused and must be freed appropriately.copyToBytes - the upper limit of the region to be copied from origMem to the newly
allocated memory.capacityBytes - the desired new capacity of the newly allocated memory in bytes and the
upper limit of the region to be cleared.void free(Memory mem)
mem - The Memory to be freedvoid free(Memory memToFree, Memory newMem)
memToFree - the Memory to be freed.newMem - this reference enables the receiver of the callback to link the Memory to be
freed with this new Memory.Copyright © 2015–2016 Yahoo! Inc.. All rights reserved.