pub(super) unsafe fn advise(ptr: *mut u8, len: usize, advice: Advice)Available on Unix and crate feature
pool and non-miri only.Expand description
Applies advice to the largest page-aligned subrange of
[ptr, ptr + len), rounding the start up and the end down so the
advice never spills onto pages the range only partially covers.
ยงSafety
The range must lie within a live mapping. For Advice::DontNeed
the caller must additionally uphold the exclusivity contract
documented on super::dontneed; the remaining advice values are
non-mutating hints.