Skip to main content

read_user_mapped_bytes

Function read_user_mapped_bytes 

Source
fn read_user_mapped_bytes(
    user_as: &AddressSpace,
    vaddr: u64,
    out: &mut [u8],
) -> Result<(), &'static str>
Expand description

Reads user mapped bytes.

Uses a single-slot page translation cache to avoid a page-table walk on every successive byte within the same page. This is the same optimisation already applied to load_segment and dramatically speeds up binaries with thousands of RELA / RELR relocations.