Struct jemalloc_ctl::opt::LgTcacheMax[][src]

pub struct LgTcacheMax(_);

A type providing access to the maximum size class (log base 2) to cache in the thread-specific cache (tcache).

At a minimum, all small size classes are cached, and at a maximum all large size classes are cached. The default maximum is 32 KiB (2^15).

Examples

extern crate jemallocator;
extern crate jemalloc_ctl;

use jemalloc_ctl::opt::LgTcacheMax;

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

fn main() {
    let lg_tcache_max = LgTcacheMax::new().unwrap();

    println!("max cached allocation size: {}", 1 << lg_tcache_max.get().unwrap());
}

Methods

impl LgTcacheMax
[src]

Returns a new LgTcacheMax.

Returns the maximum cached size class.

Trait Implementations

impl Copy for LgTcacheMax
[src]

impl Clone for LgTcacheMax
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for LgTcacheMax

impl Sync for LgTcacheMax