Struct jemalloc_ctl::opt::NArenas [−][src]
pub struct NArenas(_);
A type providing access to the maximum number of arenas to use for automatic multiplexing of threads and arenas.
The default is four times the number of CPUs, or one if there is a single CPU.
Examples
extern crate jemallocator; extern crate jemalloc_ctl; use jemalloc_ctl::opt::NArenas; #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; fn main() { let narenas = NArenas::new().unwrap(); println!("number of arenas: {}", narenas.get().unwrap()); }
Methods
impl NArenas[src]
impl NArenaspub fn new() -> Result<NArenas>[src]
pub fn new() -> Result<NArenas>Returns a new NArenas.
pub fn get(&self) -> Result<c_uint>[src]
pub fn get(&self) -> Result<c_uint>Returns the maximum number of arenas.