Skip to main content

Name

malloc2mmap_threshold — use mmap when allocations exceed this amount

Synopsis

malloc2mmap_threshold = 4092

Description

When set to a positive value, Momentum will use mmap to fulfill memory allocation requirements exeeding the malloc2mmap_threshold size, rather than allocating memory from the heap via malloc .

Lowering this setting can reduce heap fragmentation and the system RSS, but can use up more address space than heap allocations alone, since the minimum granularity of mmap is the system page size.

The default for this option is 4092.

Scope

malloc2mmap_threshold is valid in the global scope.

See Also

Was this page helpful?