pub enum MemoryConfiguration {
Adaptive,
SubSlices,
ExclusivePages,
Custom {
pool_options: Vec<MemoryPoolOptions>,
},
}Expand description
High level configuration of memory management.
Variants§
Adaptive
Opt-in workload-sized pages with relocation of unpinned live allocations. Resolved resources and native graphs keep their addresses fixed.
SubSlices
The default preset, which uses pools that allocate sub slices.
ExclusivePages
Default preset for using exclusive pages. This can be necessary for backends don’t support sub-slices.
Custom
Custom settings.
Fields
§
pool_options: Vec<MemoryPoolOptions>Options for each pool to construct. When allocating, the first possible pool will be picked for an allocation.
Implementations§
Source§impl MemoryConfiguration
impl MemoryConfiguration
Sourcepub fn is_adaptive(&self) -> bool
pub fn is_adaptive(&self) -> bool
Whether workload-sized relocatable pages are explicitly enabled.
Sourcepub fn uses_subslices(&self) -> bool
pub fn uses_subslices(&self) -> bool
Whether this preset uses sliced pages rather than a whole device heap. Custom pools retain their explicitly supplied page sizes.
Trait Implementations§
Source§impl Clone for MemoryConfiguration
impl Clone for MemoryConfiguration
Source§impl Debug for MemoryConfiguration
impl Debug for MemoryConfiguration
Auto Trait Implementations§
impl Freeze for MemoryConfiguration
impl RefUnwindSafe for MemoryConfiguration
impl Send for MemoryConfiguration
impl Sync for MemoryConfiguration
impl Unpin for MemoryConfiguration
impl UnsafeUnpin for MemoryConfiguration
impl UnwindSafe for MemoryConfiguration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more