public abstract class AbstractMemorySegmentPool extends Object implements MemorySegmentPool
| Modifier and Type | Field and Description |
|---|---|
protected int |
pageSize |
DEFAULT_PAGE_SIZE| Constructor and Description |
|---|
AbstractMemorySegmentPool(long maxMemory,
int pageSize) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract MemorySegment |
allocateMemory() |
int |
freePages() |
MemorySegment |
nextSegment()
Gets the next memory segment.
|
int |
pageSize()
Get the page size of each page this pool holds.
|
void |
returnAll(List<MemorySegment> memory)
Return all pages back into this pool.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateHeapPoolpublic AbstractMemorySegmentPool(long maxMemory,
int pageSize)
public MemorySegment nextSegment()
MemorySegmentSourcenextSegment in interface MemorySegmentSourceprotected abstract MemorySegment allocateMemory()
public int pageSize()
MemorySegmentPoolpageSize in interface MemorySegmentPoolpublic void returnAll(List<MemorySegment> memory)
MemorySegmentPoolreturnAll in interface MemorySegmentPoolmemory - the pages which want to be returned.public int freePages()
freePages in interface MemorySegmentPoolCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.