Function lrs::mem::advise

Advise the kernel of a certain memory usage pattern.

Syntax

fn advise(range: Range<usize>, advice: MemAdvice) -> Result<(), Errno>

Arguments

NameDescription
range

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

advice

The advice given.

Remarks

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

See also