public class LazyMemorySegmentPool extends Object implements MemorySegmentPool, Closeable
MemorySegmentPool that lazy allocate memory pages from MemoryManager.| Constructor and Description |
|---|
LazyMemorySegmentPool(Object owner,
org.apache.flink.runtime.memory.MemoryManager memoryManager,
int maxPages) |
| Modifier and Type | Method and Description |
|---|---|
List<org.apache.flink.core.memory.MemorySegment> |
allocateSegments(int required) |
void |
cleanCache() |
void |
close() |
int |
freePages() |
org.apache.flink.core.memory.MemorySegment |
nextSegment() |
int |
pageSize()
Get the page size of each page this pool holds.
|
void |
returnAll(List<org.apache.flink.core.memory.MemorySegment> memory)
Return all pages back into this pool.
|
void |
returnPage(org.apache.flink.core.memory.MemorySegment segment) |
public LazyMemorySegmentPool(Object owner, org.apache.flink.runtime.memory.MemoryManager memoryManager, int maxPages)
public int pageSize()
MemorySegmentPoolpageSize in interface MemorySegmentPoolpublic void returnAll(List<org.apache.flink.core.memory.MemorySegment> memory)
MemorySegmentPoolreturnAll in interface MemorySegmentPoolmemory - the pages which want to be returned.public void returnPage(org.apache.flink.core.memory.MemorySegment segment)
public org.apache.flink.core.memory.MemorySegment nextSegment()
nextSegment in interface org.apache.flink.core.memory.MemorySegmentSourcepublic List<org.apache.flink.core.memory.MemorySegment> allocateSegments(int required)
public int freePages()
freePages in interface MemorySegmentPoolpublic void close()
close in interface Closeableclose in interface AutoCloseablepublic void cleanCache()
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.