pub struct LgAlloc {
pub enabled: Option<bool>,
pub path: Option<PathBuf>,
pub background_config: Option<BackgroundWorkerConfig>,
pub eager_return: Option<bool>,
}
Expand description
Lgalloc configuration
Fields§
§enabled: Option<bool>
Whether the allocator is enabled or not.
path: Option<PathBuf>
Path where files reside.
background_config: Option<BackgroundWorkerConfig>
Configuration of the background worker.
eager_return: Option<bool>
Whether to return physical memory on deallocate
Implementations§
source§impl LgAlloc
impl LgAlloc
sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new configuration. All values are initialized to their default (None) values.
sourcepub fn with_background_config(
&mut self,
config: BackgroundWorkerConfig,
) -> &mut Self
pub fn with_background_config( &mut self, config: BackgroundWorkerConfig, ) -> &mut Self
Set the background worker configuration.
sourcepub fn eager_return(&mut self, eager_return: bool) -> &mut Self
pub fn eager_return(&mut self, eager_return: bool) -> &mut Self
Enable eager memory reclamation.
Trait Implementations§
impl Eq for LgAlloc
impl StructuralPartialEq for LgAlloc
Auto Trait Implementations§
impl Freeze for LgAlloc
impl RefUnwindSafe for LgAlloc
impl Send for LgAlloc
impl Sync for LgAlloc
impl Unpin for LgAlloc
impl UnwindSafe for LgAlloc
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)