Method lrs::mem_map::MemMap::advise

Advise the kernel of a certain memory usage pattern.

Syntax

impl MemMap {
    fn advise<R>(&mut self, range: R, advice: MemAdvice) -> Result<(), Errno>
        where R: Into<Range<Option<usize>>>,
}

Arguments

NameDescription
range

The range for which the advice holds. Must be page-aligned.

advice

The advice given.

Remarks

The DontFork and HwPoison advices cannot be used safely. Trying to use them with this interface causes a process abort.

See also