StorageMemoryPool¶
StorageMemoryPool is a MemoryPool.
Creating Instance¶
StorageMemoryPool takes the following to be created:
- Lock Object
-
MemoryMode(ON_HEAPorOFF_HEAP)
StorageMemoryPool is created when:
MemoryStore¶
StorageMemoryPool is given a MemoryStore when MemoryManager is requested to associate one with the on- and off-heap storage memory pools.
StorageMemoryPool uses the MemoryStore (to evict blocks) when requested to:
Size of Memory Used¶
StorageMemoryPool keeps track of the size of the memory acquired.
The size descreases when StorageMemoryPool is requested to releaseMemory or releaseAllMemory.
memoryUsed is part of the MemoryPool abstraction.
Acquiring Memory¶
acquireMemory(
blockId: BlockId,
numBytes: Long): Boolean
acquireMemory(
blockId: BlockId,
numBytesToAcquire: Long,
numBytesToFree: Long): Boolean
acquireMemory...FIXME
acquireMemory is used when:
UnifiedMemoryManageris requested to acquire storage memory
Freeing Space to Shrink Pool¶
freeSpaceToShrinkPool(
spaceToFree: Long): Long
freeSpaceToShrinkPool...FIXME
freeSpaceToShrinkPool is used when:
UnifiedMemoryManageris requested to acquire execution memory