Struct tikv_jemalloc_sys::extent_hooks_s
source · [−]#[repr(C)]pub struct extent_hooks_s {
pub alloc: Option<extent_alloc_t>,
pub dalloc: Option<extent_dalloc_t>,
pub destroy: Option<extent_destroy_t>,
pub commit: Option<extent_commit_t>,
pub decommit: Option<extent_decommit_t>,
pub purge_lazy: Option<extent_purge_t>,
pub purge_forced: Option<extent_purge_t>,
pub split: Option<extent_split_t>,
pub merge: Option<extent_merge_t>,
}
Expand description
Extent lifetime management functions.
The extent_hooks_t structure comprises function pointers which are described
individually below. jemalloc
uses these functions to manage extent lifetime,
which starts off with allocation of mapped committed memory, in the simplest
case followed by deallocation. However, there are performance and platform
reasons to retain extents for later reuse. Cleanup attempts cascade from
deallocation to decommit to forced purging to lazy purging, which gives the
extent management functions opportunities to reject the most permanent
cleanup operations in favor of less permanent (and often less costly)
operations. All operations except allocation can be universally opted out of
by setting the hook pointers to NULL
, or selectively opted out of by
returning failure. Note that once the extent hook is set, the structure is
accessed directly by the associated arenas, so it must remain valid for the
entire lifetime of the arenas.
Fields
alloc: Option<extent_alloc_t>
dalloc: Option<extent_dalloc_t>
destroy: Option<extent_destroy_t>
commit: Option<extent_commit_t>
decommit: Option<extent_decommit_t>
purge_lazy: Option<extent_purge_t>
purge_forced: Option<extent_purge_t>
split: Option<extent_split_t>
merge: Option<extent_merge_t>
Trait Implementations
sourceimpl Clone for extent_hooks_s
impl Clone for extent_hooks_s
sourcefn clone(&self) -> extent_hooks_s
fn clone(&self) -> extent_hooks_s
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 Default for extent_hooks_s
impl Default for extent_hooks_s
sourcefn default() -> extent_hooks_s
fn default() -> extent_hooks_s
Returns the “default value” for a type. Read more
impl Copy for extent_hooks_s
Auto Trait Implementations
impl RefUnwindSafe for extent_hooks_s
impl Send for extent_hooks_s
impl Sync for extent_hooks_s
impl Unpin for extent_hooks_s
impl UnwindSafe for extent_hooks_s
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more