Re-exports§
pub use crate::sync::with_irqs_disabled;pub use address_space::kernel_address_space;pub use address_space::AddressSpace;pub use address_space::EffectiveMapping;pub use address_space::VmaFlags;pub use address_space::VmaPageSize;pub use address_space::VmaType;pub use block::BlockHandle;pub use block::BuddyReserved;pub use block::Exclusive;pub use block::MappedExclusive;pub use block::PhysBlock;pub use block::Released;pub use block_meta::get_block_meta;pub use block_meta::resolve_handle;pub use buddy::buddy_alloc_fail_counts_snapshot;pub use buddy::get_allocator;pub use buddy::poison_quarantine_pages_snapshot;pub use frame::block_phys_has_poison_guard;pub use frame::frame_meta_debug_snapshot;pub use frame::get_meta;pub use frame::get_meta_slot;pub use frame::invoke_vtable_on_last_ref;pub use frame::invoke_vtable_on_unmap;pub use frame::meta_generation_matches;pub use frame::meta_guard;pub use frame::AllocError;pub use frame::FrameAllocOptions;pub use frame::FrameAllocator;pub use frame::FrameMeta;pub use frame::FrameMetaVtable;pub use frame::FramePurpose;pub use frame::FreeListLink;pub use frame::MetaSlot;pub use frame::PhysFrame;pub use frame::DEFAULT_FRAME_META_VTABLE;pub use frame::META_SLOT_REFCOUNT_BYTE_OFFSET;pub use mapping_index::MappingIndex;pub use mapping_index::MappingRef;pub use ownership::BlockState;pub use ownership::OwnerEntry;pub use ownership::OwnerError;pub use ownership::OwnershipTable;pub use ownership::RemoveRefResult;pub use region_cap::MemoryRegionRegistry;pub use region_cap::PublicMemoryRegionInfo;pub use region_cap::RegionCapError;pub use region_cap::ReleaseRegionResult;pub use userslice::UserSliceError;pub use userslice::UserSliceRead;pub use userslice::UserSliceReadWrite;pub use userslice::UserSliceWrite;
Modules§
- address_
space - Per-process address spaces for Strat9-OS.
- block
- Block-oriented physical memory handles.
- block_
meta - Compatibility layer for the block-oriented metadata API.
- boot_
alloc - Allocateur physique de boot pour les structures permanentes du noyau.
- buddy
- cow
- Copy-on-Write (COW) support for fork()
- frame
- Physical frame allocator abstraction.
- heap
- mapping_
index - Reverse mapping index for memory capabilities.
- ownership
- Central ownership tracking for physical blocks.
- paging
- Virtual Memory Management (Paging) for Strat9-OS
- region_
cap - Public memory-region capability registry.
- userslice
- Userspace pointer validation for Strat9-OS.
- vmalloc
- VM-backed allocator for large heap objects.
- zone
Structs§
- Phys
Contiguous Diag - Snapshot of contiguous-physical-allocation telemetry.
Functions§
- allocate_
frame - Allocate a single zeroed physical frame with
KernelDatapurpose. - allocate_
frame_ for_ purpose - Allocate a single zeroed 4 KiB frame for an explicit purpose.
- allocate_
frames Deprecated - Allocate
2^ordercontiguous physical frames (raw, no zeroing). - allocate_
kernel_ stack_ frames - Allocate physically contiguous pages for a kernel stack.
- allocate_
kernel_ virtual - Allocate virtually contiguous kernel memory backed by fragmented physical pages.
- allocate_
mapping_ cap_ id - Allocates a fresh internal mapping capability identifier.
- allocate_
user_ frame - Allocate a single zeroed 4 KiB frame intended for user-space memory.
- allocate_
zeroed_ frame - Allocate a single zeroed 4 KiB frame.
- free_
frame - Free a single physical frame.
Requires an
IrqDisabledTokenproving that IRQs are disabled on the calling CPU. The caller must ensure that the frame is not currently mapped anywhere and that the buddy allocator’s internal metadata is consistent with the frame’s state (e.g. refcount = 0). Preferfree_frames()for multi-frame blocks or when the buddy allocator’s internal state may need to be updated. This raw path is kept for symmetry withallocate_frames()and for special cases where the caller manages zeroing and metadata explicitly. For standard single-frame deallocation, preferrelease_owned_block()which also handles ownership table updates and safety checks. - free_
frames Deprecated - Free
2^ordercontiguous physical frames. - free_
kernel_ stack_ frames - Free pages previously returned by
allocate_kernel_stack_frames. - free_
kernel_ virtual - Free memory previously returned by
allocate_kernel_virtual. - hhdm_
offset - Get the current HHDM offset
- init_
cow_ subsystem - Initialize copy-on-write metadata.
- init_
memory_ manager - Initialize the memory management subsystem
- mapping_
index - Returns the global reverse mapping index used by the memory runtime.
- memory_
region_ registry - Returns the global public memory-region registry.
- ownership_
table - Returns the global ownership table used by the memory runtime.
- phys_
contiguous_ diag - Read current contiguous-allocation telemetry without locking.
- phys_
to_ virt - Convert a physical address to a virtual address using the HHDM offset
- register_
mapping_ identity - Records that
cap_idnow nameshandlein the ownership table. - release_
owned_ block - Releases a block back to the buddy allocator.
- revoke_
mapping_ cap_ id - Revokes every live mapping associated with
cap_id. - set_
hhdm_ offset - Store the HHDM offset (call once, early in boot)
- try_
register_ mapping_ identity - Fallible variant of mapping identity registration for transactional callers.
- unregister_
mapping_ identity - Removes
cap_idfrom the ownership table entry associated withhandle. - virt_
to_ phys - Convert a virtual address back to a physical address (reverse of phys_to_virt)