Skip to main content

kh_runtime/mem/
mod.rs

1//! Guest and host page geometry for Darwin arm64 images on Linux.
2
3mod layout;
4// `map` needs `unsafe` for owned mapping slices / pointer arithmetic only.
5#[allow(unsafe_code)]
6mod map;
7// `registry` needs `unsafe impl Send` for host mapping pointers.
8#[allow(unsafe_code)]
9mod registry;
10
11pub use layout::{DARWIN_ARM64_PAGE_SIZE, GuestPageSize, HostPageSize, PageError, PageLayout};
12pub use map::{
13    GuestMemory, MapError, MapRequest, MappedRegion, VM_PROT_EXECUTE, VM_PROT_READ, VM_PROT_WRITE,
14    darwin_to_host_prot, map_stack, mprotect_darwin, mprotect_rw,
15};
16pub use registry::{
17    AddressSpace, RegRegionSnapshot, RemoveOutcome, check_range as registry_check_range,
18    clear as registry_clear, find_covering as registry_find, install_active as registry_install,
19    is_active as registry_is_active, register_borrowed, register_owned,
20    remove_range as registry_remove, take_active as registry_take,
21    update_prot as registry_update_prot, with_active as registry_with_active,
22    with_active_mut as registry_with_active_mut,
23};