Jemalloc tuning via Cargo config

This commit is contained in:
Michael Sproul
2022-03-07 18:47:05 +11:00
parent f93dfd0c28
commit e48ab54dcc
4 changed files with 21 additions and 3 deletions

View File

@@ -1,2 +1,12 @@
//! Set the allocator to `jemalloc`.
//!
//! Due to `jemalloc` requiring configuration at compile time or immediately upon runtime
//! initialisation it is configured via a Cargo config file in `.cargo/config.toml`.
//!
//! The `jemalloc` tuning can be overriden by:
//!
//! A) `JEMALLOC_SYS_WITH_MALLOC_CONF` at compile-time.
//! B) `_RJEM_MALLOC_CONF` at runtime.
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;