pub struct epoch;Expand description
jemalloc epoch.
Many of the statistics tracked by jemalloc are cached. The epoch
controls when they are refreshed.
§Example
Advancing the epoch:
use tikv_jemalloc_ctl::epoch;
let e = epoch::mib().unwrap();
let a = e.advance().unwrap();
let b = e.advance().unwrap();
assert_eq!(a + 1, b);
let o = e.update(0).unwrap();
assert_eq!(o, e.read().unwrap());Implementations§
Auto Trait Implementations§
impl Freeze for epoch
impl RefUnwindSafe for epoch
impl Send for epoch
impl Sync for epoch
impl Unpin for epoch
impl UnsafeUnpin for epoch
impl UnwindSafe for epoch
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