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]

[src]

Returns a new Allocated.

[src]

Returns the total number of bytes in active pages allocated by the application.

Trait Implementations

impl Copy for Active
[src]

impl Clone for Active
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more