public class PowerOfTwoFileAllocator extends Object
This allocator allocates only power-of-two size chunks. In addition these chunks are then only allocated on alignment with their own size. Hence a chunk of 2n size can only be allocated to an address satisfying a=2nx where x is a long.
| Constructor and Description |
|---|
PowerOfTwoFileAllocator() |
PowerOfTwoFileAllocator(long size) |
| Modifier and Type | Method and Description |
|---|---|
Long |
allocate(long size) |
void |
free(long address,
long length) |
void |
mark(long address,
long length) |
long |
occupied() |
String |
toString() |
Copyright © 2015–2024. All rights reserved.