Struct jemalloc_ctl::stats::Active
[−]
[src]
pub struct Active(_);
A type providing access to the total number of bytes in active pages allocated by the application.
This is a multiple of the page size, and 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
use jemalloc_ctl::Epoch; use jemalloc_ctl::stats::Active; let epoch = Epoch::new().unwrap(); let active = Active::new().unwrap(); let a = active.get().unwrap(); let _buf = vec![0; 1024 * 1024]; epoch.advance().unwrap(); let b = active.get().unwrap(); assert!(a < b);
Methods
impl Active[src]
fn new() -> Result<Active>[src]
Returns a new Allocated.
fn get(&self) -> Result<usize>[src]
Returns the total number of bytes in active pages allocated by the application.