Function vmap::allocation_size
source · pub fn allocation_size() -> usize
Expand description
Gets a cached version of the system allocation granularity size.
On Windows this value is typically 64k. Otherwise it is the same as the page size.
§Examples
let alloc_size = vmap::allocation_size();
println!("the system allocation granularity is {} bytes", alloc_size);
if cfg!(windows) {
assert!(alloc_size >= 65536);
} else {
assert!(alloc_size >= 4096);
}