Function jemalloc_ctl::stats::active [−][src]
pub fn active() -> Result<usize>
Returns the total number of bytes in active pages allocated by the application.
This is a multiple of the page size, and is greater than or equal to the value returned by
allocated.
This statistic is cached, and is only refreshed when the epoch is advanced. See the epoch
type for more information.
This corresponds to stats.active in jemalloc's API.
Examples
extern crate jemallocator; extern crate jemalloc_ctl; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; fn main() { let a = jemalloc_ctl::stats::active().unwrap(); let _buf = vec![0; 1024 * 1024]; jemalloc_ctl::epoch().unwrap(); let b = jemalloc_ctl::stats::active().unwrap(); assert!(a < b); }