Function jemalloc_ctl::epoch [−][src]
pub fn epoch() -> Result<u64>
Advances the jemalloc epoch, returning it.
Many of the statistics tracked by jemalloc are cached. The epoch controls when they are refreshed.
Example
Advancing the epoch:
extern crate jemallocator; extern crate jemalloc_ctl; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; fn main() { let a = jemalloc_ctl::epoch().unwrap(); let b = jemalloc_ctl::epoch().unwrap(); assert_eq!(a + 1, b); }