MemoryPool
= MemoryPool
MemoryPool is a bookkeeping abstraction of <
MemoryPool is used by the memory:MemoryManager.md[MemoryManager] to track the division of memory between storage and execution.
== [[extensions]] Extensions
.MemoryPools [cols="30,70",options="header",width="100%"] |=== | MemoryPool | Description
| ExecutionMemoryPool.md[ExecutionMemoryPool] | [[ExecutionMemoryPool]]
| StorageMemoryPool.md[StorageMemoryPool] | [[StorageMemoryPool]]
|===
== [[creating-instance]][[lock]] Creating Instance
MemoryPool takes a single lock object to be created (used for synchronization).
== [[_poolSize]][[poolSize]] Pool Size
[source,scala]¶
_poolSize: Long = 0¶
++_poolSize++ is the maximum size of the memory pool.
++_poolSize++ can be <
++_poolSize++ is used to report <
== [[memoryUsed]] Amount of Memory Used
[source, scala]¶
memoryUsed: Long¶
memoryUsed gives the amount of memory used in this pool (in bytes).
memoryUsed is used when:
-
MemoryManager is requested for the memory:MemoryManager.md#storageMemoryUsed[total storage memory in use]
-
MemoryPool is requested for the current <
> and to < > -
StorageMemoryPool is requested to acquireMemory
-
UnifiedMemoryManager is requested to memory:UnifiedMemoryManager.md#maxOnHeapStorageMemory[maxOnHeapStorageMemory], memory:UnifiedMemoryManager.md#maxOffHeapStorageMemory[maxOffHeapStorageMemory] and memory:UnifiedMemoryManager.md#acquireExecutionMemory[acquireExecutionMemory]
== [[memoryFree]] Amount of Free Memory
[source, scala]¶
memoryFree: Long¶
memoryFree gives the amount of free memory in the pool (in bytes) by simply subtracting the <
memoryFree is used when...FIXME
== [[decrementPoolSize]] Shrinking Pool Size
[source, scala]¶
decrementPoolSize( delta: Long): Unit
decrementPoolSize makes the <<_poolSize, _poolSize>> smaller by the given delta
bytes.
decrementPoolSize requires that the given delta bytes has to meet the requirements:
-
be positive
-
up to the current <<_poolSize, _poolSize>>
-
Does not shrink the current <<_poolSize, _poolSize>> below the <
> threshold
decrementPoolSize is used when...FIXME
== [[incrementPoolSize]] Expanding Pool Size
[source, scala]¶
incrementPoolSize( delta: Long): Unit
incrementPoolSize makes the <<_poolSize, _poolSize>> bigger by the given delta
bytes.
incrementPoolSize requires that the given delta bytes has to be positive.
incrementPoolSize is used when...FIXME