Skip to main content

MALLOC_CONF_METADATA_THP

Constant MALLOC_CONF_METADATA_THP 

Source
const MALLOC_CONF_METADATA_THP: &str;
Expand description

Asks jemalloc to back allocator metadata with huge pages where it can.

Jemalloc needs MADV_HUGEPAGE (which its build ignores on 32-bit ARM) or memcntl. Without either, a debug build aborts during allocator initialization, and the key’s only remaining effect in release is whether the tcache stacks come from the never-purging base allocator, since base blocks keep the 2 MiB alignment and rounding of BASE_BLOCK_MIN_ALIGN either way.