public interface Allocator
| Modifier and Type | Method and Description |
|---|---|
Allocation |
allocate()
Obtain an
Allocation. |
int |
getIndividualAllocationLength()
Returns the length of each individual
Allocation. |
int |
getTotalBytesAllocated()
Returns the total number of bytes currently allocated.
|
void |
release(Allocation allocation)
Releases an
Allocation back to the allocator. |
void |
release(Allocation[] allocations)
Releases an array of
Allocations back to the allocator. |
void |
trim()
Hints to the allocator that it should make a best effort to release any excess
Allocations. |
Allocation allocate()
Allocation.
When the caller has finished with the Allocation, it should be returned by calling
release(Allocation).
Allocation.void release(Allocation allocation)
Allocation back to the allocator.allocation - The Allocation being released.void release(Allocation[] allocations)
Allocations back to the allocator.allocations - The array of Allocations being released.void trim()
Allocations.int getTotalBytesAllocated()
int getIndividualAllocationLength()
Allocation.