Skip to content

StorageMemoryPool

StorageMemoryPool is a MemoryPool.

Creating Instance

StorageMemoryPool takes the following to be created:

  • Lock Object
  • MemoryMode (ON_HEAP or OFF_HEAP)

StorageMemoryPool is created when:

  • MemoryManager is created (and initializes on-heap and off-heap storage memory pools)

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:

Freeing Space to Shrink Pool

freeSpaceToShrinkPool(
  spaceToFree: Long): Long

freeSpaceToShrinkPool...FIXME

freeSpaceToShrinkPool is used when:

Back to top