ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation.memory.vm.core Module Reference

Typedefs

using zxfoundation::memory::vm::region_visitor = bool (*)(vm_region&) noexcept
 Walk every active vm_region in the system via callback.

Functions

auto zxfoundation::memory::vm::vm_destroy_space (vm_space &space) noexcept -> void
 Destroy all regions in a VME space, freeing region descriptors.
auto zxfoundation::memory::vm::vm_drain_phys_range (u64 phys_start, u64 phys_end) noexcept -> u32
 Drain resident mappings whose phys lies in [phys_start,phys_end].
auto zxfoundation::memory::vm::vm_find (const vm_space &space, u64 va) noexcept -> vm_region *
 RCU-protected lookup: find the vm_region containing VA.
auto zxfoundation::memory::vm::vm_find_gap (const vm_space &space, u64 size, u64 align) noexcept -> std::expected< u64, lib::kernel_error >
 Top-down scan from mmap_base for a gap of at least size bytes.
auto zxfoundation::memory::vm::vm_find_grant_mapping (vm_space &space, objects::memory_object_ref grant) noexcept -> vm_region *
 Find one live mapping view that consumes grant.
auto zxfoundation::memory::vm::vm_for_each_region (region_visitor callback) noexcept -> void
auto zxfoundation::memory::vm::vm_init () noexcept -> void
 Initialize the VME subsystem (create SCOMS table for vm_region).
auto zxfoundation::memory::vm::vm_map (vm_space &space, u64 size, vm_prot prot, vm_flags flags) noexcept -> std::expected< u64, lib::kernel_error >
 Map a region of size bytes with given protection and flags.
auto zxfoundation::memory::vm::vm_map_extent (vm_space &space, u64 root_phys, u64 va, u64 length, vm_prot prot, objects::memory_object_ref extent_ref, u64 extent_offset) noexcept -> std::expected< void, lib::kernel_error >
 Map a checked subrange of a capability-bound physical extent. The caller supplies an offset, never an arbitrary physical address.
auto zxfoundation::memory::vm::vm_map_fixed (vm_space &space, u64 va, u64 size, vm_prot prot, vm_flags flags, vm_backing backing, u64 phys_base, objects::memory_object_ref mapped_extent) noexcept -> std::expected< void, lib::kernel_error >
 Map at an exact VA with specified backing.
auto zxfoundation::memory::vm::vm_map_shared_region (vm_space &target, u64 target_root_phys, u64 target_va, u64 length, vm_region &source, vm_prot prot) noexcept -> std::expected< void, lib::kernel_error >
auto zxfoundation::memory::vm::vm_protect (vm_space &space, u64 root_phys, u64 va, u64 size, vm_prot new_prot) noexcept -> std::expected< void, lib::kernel_error >
 Change protection bits for [va, va+size).
auto zxfoundation::memory::vm::vm_region_find_by_id (u32 id) noexcept -> vm_region *
 Look up a vm_region by SCOMS ID.
auto zxfoundation::memory::vm::vm_region_maps_phys (const vm_region &rgn, u64 phys) noexcept -> bool
 Test if phys is mapped-resident in rgn.
auto zxfoundation::memory::vm::vm_rekey_region (vm_space &space, vm_region &rgn, u64 new_start) noexcept -> bool
auto zxfoundation::memory::vm::vm_space_drain_phys_range (vm_space &space, u64 phys_start, u64 phys_end) noexcept -> u32
 Drop all resident page mappings in space whose backing physical address lies in [phys_start, phys_end).
auto zxfoundation::memory::vm::vm_space_init (vm_space &space) noexcept -> void
 Initialize a per-domain VME address space.
auto zxfoundation::memory::vm::vm_space_set_commit_limit (vm_space &space, u64 limit_pages) noexcept -> std::expected< void, lib::kernel_error >
 Set a domain VM-space committed-page budget.
auto zxfoundation::memory::vm::vm_space_try_charge_commit (vm_space &space, u64 pages) noexcept -> bool
 Atomically reserve committed pages for a caller that cannot retain space.lock through its fallible page-install work.
auto zxfoundation::memory::vm::vm_space_uncharge_commit (vm_space &space, u64 pages) noexcept -> void
 Return a page charge obtained from vm_space_try_charge_commit.
auto zxfoundation::memory::vm::vm_split (vm_space &space, vm_region *rgn, u64 split_va) noexcept -> std::expected< vm_region *, lib::kernel_error >
 Split rgn at split_va into [rgn->va_start, split_va) and [split_va, old_end).
auto zxfoundation::memory::vm::vm_try_merge (vm_space &space, vm_region *rgn) noexcept -> void
 Try to merge rgn with its predecessor and/or successor.
auto zxfoundation::memory::vm::vm_unmap (vm_space &space, u64 root_phys, u64 va, u64 size) noexcept -> std::expected< void, lib::kernel_error >
 Unmap pages in [va, va+size), splitting partially-overlapping regions, removing fully-covered regions, and freeing physical pages.

Files

file  zxfoundation/memory/vm.zcomponent/core.cxxm
 Virtual Memory Engine — core interface.
file  zxfoundation/memory/vm.zcomponent/core.cxx
 Virtual Memory Engine — core operations.