Skip to main content

Module swap

Module swap 

Source
Available on Unix and crate feature pager only.
Expand description

Swap backend for the pager. See mz_ore::pager for the public API.

StructsΒ§

SwapInner πŸ”’
Storage for a swap-backed handle.

FunctionsΒ§

advise_pageout
Proactively reclaims (swaps out) the resident pages of bytes via MADV_PAGEOUT, holding RSS at the caller’s budget right now rather than waiting for kernel LRU to reclaim under pressure the way pageout_swap’s MADV_COLD hint does.
copy_range πŸ”’
madvise_aligned πŸ”’ ⚠Linux
Issues madvise(advice) over the page-aligned interior of the byte range [base_ptr, base_ptr + len_bytes). madvise operates at page granularity, so the start rounds up and the end rounds down to page boundaries; a range that contains no whole page is skipped so we never advise pages we only partially own.
madvise_cold πŸ”’ Linux
madvise_pageout πŸ”’ Linux
page_size πŸ”’ Linux
pageout_swap πŸ”’
read_at_swap πŸ”’
take_swap πŸ”’