public interface Allocator extends Closeable
| Modifier and Type | Method and Description |
|---|---|
long |
allocate(int size)
Allocate space with the given size.
|
void |
free(long address)
Free the space with the given address.
|
Chunk |
getChunkById(int chunkId)
Returns the chunk with the given chunk id.
|
long allocate(int size)
throws Exception
size - size of space to allocate.Exception - This method will throw exception if failed to allocate space.void free(long address)
address - address of the space to free.Chunk getChunkById(int chunkId)
chunkId - id of the chunk.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.