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]
impl LgTcacheMax
pub fn new() -> Result<LgTcacheMax>
[src]
pub fn new() -> Result<LgTcacheMax>
Returns a new LgTcacheMax
.
pub fn get(&self) -> Result<usize>
[src]
pub fn get(&self) -> Result<usize>
Returns the maximum cached size class.
Trait Implementations
impl Copy for LgTcacheMax
[src]
impl Copy for LgTcacheMax
impl Clone for LgTcacheMax
[src]
impl Clone for LgTcacheMax
fn clone(&self) -> LgTcacheMax
[src]
fn clone(&self) -> LgTcacheMax
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for LgTcacheMax
impl Send for LgTcacheMax
impl Sync for LgTcacheMax
impl Sync for LgTcacheMax