Function mmtk::util::memory::dzmmap

source ·
pub unsafe fn dzmmap(
    start: Address,
    size: usize,
    strategy: MmapStrategy
) -> Result<()>
Expand description

Demand-zero mmap: This function mmaps the memory and guarantees to zero all mapped memory. This function WILL overwrite existing memory mapping. The user of this function needs to be aware of this, and use it cautiously.

§Safety

This function WILL overwrite existing memory mapping if there is any. So only use this function if you know the memory has been reserved by mmtk (e.g. after the use of mmap_noreserve()). Otherwise using this function may corrupt others’ data.