pub enum MemoryManagerConfig {
Existing(Arc<MemoryManager>),
New {
max_memory: usize,
memory_fraction: f64,
},
}
Expand description
Configuration information for memory management
Variants
Existing(Arc<MemoryManager>)
Use the existing MemoryManager
New
Fields
max_memory: usize
Max execution memory allowed for DataFusion. Defaults to
usize::MAX
, which will not attempt to limit the memory
used during plan execution.
memory_fraction: f64
The fraction of max_memory
that the memory manager will
use for execution.
The purpose of this config is to set aside memory for untracked data structures, and imprecise size estimation during memory acquisition. Defaults to 0.7
Create a new MemoryManager that will use up to some fraction of total system memory.
Implementations
sourceimpl MemoryManagerConfig
impl MemoryManagerConfig
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new memory MemoryManager with no limit on the memory used
sourcepub fn new_existing(existing: Arc<MemoryManager>) -> Self
pub fn new_existing(existing: Arc<MemoryManager>) -> Self
Create a configuration based on an existing MemoryManager
sourcepub fn try_new_limit(max_memory: usize, memory_fraction: f64) -> Result<Self>
pub fn try_new_limit(max_memory: usize, memory_fraction: f64) -> Result<Self>
Create a new MemoryManager with a max_memory
and fraction
Trait Implementations
sourceimpl Clone for MemoryManagerConfig
impl Clone for MemoryManagerConfig
sourcefn clone(&self) -> MemoryManagerConfig
fn clone(&self) -> MemoryManagerConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MemoryManagerConfig
impl Debug for MemoryManagerConfig
Auto Trait Implementations
impl !RefUnwindSafe for MemoryManagerConfig
impl Send for MemoryManagerConfig
impl Sync for MemoryManagerConfig
impl Unpin for MemoryManagerConfig
impl !UnwindSafe for MemoryManagerConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more