Function jemalloc_ctl::background_thread[][src]

pub fn background_thread() -> Result<bool>

Returns the state of internal background worker threads.

When enabled, background threads are created on demand (the number of background threads will be no more than the number of CPUs or active arenas). Threads run periodically and handle purging asynchronously.

extern crate jemallocator;
extern crate jemalloc_ctl;

#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;

fn main() {
    println!("background_thread: {}", jemalloc_ctl::background_thread().unwrap());
}