Skip to main content

set_mapping_limit

Function set_mapping_limit 

Source
pub fn set_mapping_limit(mapping_limit: usize) -> bool
Expand description

Keeps an output-sized buffer on the heap up to mapping_limit bytes.

The C library serves an allocation above this limit from a fresh mapping and returns it to the kernel on free, which is what makes a later request fault its pages again. Returns false when the platform heap has no such setting, which is every target outside glibc Linux.