Skip to main content

Module memory_pool

Module memory_pool 

Source
Expand description

MemoryPool for memory management during query execution, proxy for help with allocation accounting.

Modules§

arrowarrow_buffer_pool
Adapter for integrating DataFusion’s MemoryPool with Arrow’s memory tracking APIs.
proxy
units
Common data size units

Structs§

DriftSample
One observation of drift, recorded by MemoryDriftTracker.
FairSpillPool
A MemoryPool that prevents spillable reservations from using more than an even fraction of the available memory sans any unspillable reservations (i.e. (pool_size - unspillable_memory) / num_spillable_reservations)
GreedyMemoryPool
A MemoryPool that implements a greedy first-come first-serve limit.
MemoryConsumer
A memory consumer is a named allocation traced by a particular MemoryReservation in a MemoryPool. All allocations are registered to a particular MemoryConsumer;
MemoryConsumerMetrics
A point-in-time snapshot of a tracked memory consumer’s state.
MemoryDriftTracker
Compares allocated bytes against the total reserved by every pool that reports to it (see PeakRecordingPool::with_drift_tracker).
MemoryReservation
A MemoryReservation tracks an individual reservation of a number of bytes of memory in a MemoryPool that is freed back to the pool on drop.
MergeMemoryPool
Shares reserved merge workspace across child reservations and temporary loans.
PeakRecordingPool
Wraps a MemoryPool, recording the high-water mark of MemoryPool::reserved as reservations come and go.
TrackConsumersPool
A MemoryPool that tracks the consumers that have reserved memory within the inner memory pool.
UnboundedMemoryPool
A MemoryPool that enforces no limit
WorkspaceLoan
A temporary claim on workspace already reserved by a MergeMemoryPool.

Enums§

MemoryLimit
Memory limit of MemoryPool

Constants§

DEFAULT_DRIFT_LOG_THRESHOLD
Default rise in drift, in bytes, needed before another line is logged.

Traits§

MemoryPool
Tracks and potentially limits memory use across operators during execution.

Functions§

human_readable_count
Present count in human-readable form with K, M, B, T suffixes
human_readable_duration
Present duration in human-readable form with 2 decimal places
human_readable_size
Present size in human-readable form

Type Aliases§

AllocatedBytesFn
Returns the number of bytes currently allocated by the process.