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
Create a new MemoryManager that will use up to some fraction of total system memory.
Implementations§
source§impl 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§
source§impl Clone for MemoryManagerConfig
impl Clone for MemoryManagerConfig
source§fn clone(&self) -> MemoryManagerConfig
fn clone(&self) -> MemoryManagerConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more