Expand description
Memory objects (IPC ABI v2, Β§9.1).
A MemObject owns zeroed frames registered in the frame ownership table
(the SharedRing machinery). Lifetime is reference-counted per frame:
- the object holds one owner reference per frame, dropped with the last handle;
- every
SYS_MEMOBJ_MAPmapping registers a fresh mapping identity per page, dropped bymunmapor address-space teardown.
A frame returns to the allocator only when both kinds of reference are gone, so closing every handle while a mapping exists (or the reverse) can never expose a freed frame.
Accounting: the backing is charged to the creatorβs silo at creation
(released with the object). Each mapping is additionally charged as a
virtual region to the mapping silo, like every other mapping, because
munmap and address-space teardown always refund the mapping length:
an uncharged (AlreadyCharged) mapping would make that refund credit
bytes that were never charged.
Re-exportsΒ§
use super::quota::MemCharge;πuse crate::memory::address_space::AddressSpace;πuse crate::memory::address_space::SiloCharge;πuse crate::memory::address_space::VmaFlags;πuse crate::memory::address_space::VmaPageSize;πuse crate::memory::address_space::VmaType;πuse crate::syscall::error::SyscallError;πuse alloc::vec::Vec;πuse strat9_abi::ipc_v2::MEMOBJ_MAX_SIZE;πuse strat9_abi::ipc_v2::MEMOBJ_PROT_EXEC;πuse strat9_abi::ipc_v2::MEMOBJ_PROT_READ;πuse strat9_abi::ipc_v2::MEMOBJ_PROT_WRITE;πuse strat9_abi::ipc_v2::MEM_EXEC;πuse strat9_abi::ipc_v2::MEM_READ;πuse strat9_abi::ipc_v2::MEM_WRITE;π
StructsΒ§
- MemObject
- A shareable, mappable memory object.
ConstantsΒ§
- PAGE π
FunctionsΒ§
- page_
round - Validate a requested size and round it up to whole pages.