Skip to main content

Module je

Module je 

Source
Expand description

jemalloc allocator

Re-exportsΒ§

use std::alloc::Layout; πŸ”’
use std::io::Write; πŸ”’
use std::panic::catch_unwind; πŸ”’
use std::process::abort; πŸ”’
use std::sync::atomic::AtomicBool; πŸ”’
use std::sync::atomic::AtomicU64; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use const_str::concat_bytes; πŸ”’
use jevmalloc::Jemalloc; πŸ”’
use jevmalloc::global::hook::ALLOC; πŸ”’
use jevmalloc::global::hook::ALLOC_ZEROED; πŸ”’
use jevmalloc::stats::print as print_stats; πŸ”’
use libc::c_char; πŸ”’
use libc::STDOUT_FILENO; πŸ”’
use libc::c_void; πŸ”’
use libc::write; πŸ”’
use crate::arrayvec::ArrayVec; πŸ”’
use crate::utils::BoolExt; πŸ”’

ModulesΒ§

this_thread
Exposes jemalloc state controls associated with the calling thread.

ConstantsΒ§

MALLOC_CONF πŸ”’
MALLOC_CONF_BACKGROUND πŸ”’
MALLOC_CONF_METADATA_THP πŸ”’
Asks jemalloc to back allocator metadata with huge pages where it can.
MALLOC_CONF_PERCPU_ARENA πŸ”’
Assigns arenas by CPU where jemalloc can tell which CPU a thread runs on.
_MALLOC_CONF_PROF πŸ”’

StaticsΒ§

COUNT_GLOBAL_ALLOCS πŸ”’
GLOBAL_ALLOCS πŸ”’
JEMALLOC πŸ”’
MALLOC_CONF_PREFIXED
Provides the jemalloc startup configuration under the symbol name a prefixed build reads.
TRACE_GLOBAL_ALLOCS πŸ”’
malloc_conf
Provides the process-wide jemalloc startup configuration.

FunctionsΒ§

_static_initialization πŸ”’
Registers the allocation-observer callbacks during process startup.
background_thread_enable
Enables or disables jemalloc’s background purge workers.
global_alloc_count
Returns the process allocation count observed by the allocator hook.
global_alloc_hook πŸ”’
global_alloc_zeroed_hook πŸ”’
handle_global_alloc πŸ”’
memory_stats
Collects jemalloc’s UTF-8 statistics report with the supplied print options.
trim
Reclaims unused pages from every initialized arena.

Type AliasesΒ§

TraceLine πŸ”’
Line buffer for one allocation-trace record. A record of three integers at their maximum widths occupies 74 bytes.