Module os::mm

source · [−]
Expand description

Memory management implementation

SV39 page-based virtual-memory architecture for RV64 systems, and everything about memory management, like frame allocator, page table, map area and memory set, is implemented here.

Every task or process has a memory_set to control its virtual memory.

Re-exports

pub use address::VPNRange;
pub use address::PhysAddr;
pub use address::PhysPageNum;
pub use address::StepByOne;
pub use address::VirtAddr;
pub use address::VirtPageNum;
pub use frame_allocator::frame_alloc;
pub use frame_allocator::frame_alloc_more;
pub use frame_allocator::frame_dealloc;
pub use frame_allocator::FrameTracker;
pub use memory_set::remap_test;
pub use memory_set::kernel_token;
pub use memory_set::MapArea;
pub use memory_set::MapPermission;
pub use memory_set::MapType;
pub use memory_set::MemorySet;
pub use memory_set::KERNEL_SPACE;
pub use memory_set::KERNEL_SPACE;
pub use page_table::translated_byte_buffer;
pub use page_table::translated_ref;
pub use page_table::translated_refmut;
pub use page_table::translated_str;
pub use page_table::PageTable;
pub use page_table::PageTableEntry;
pub use page_table::UserBuffer;
pub use page_table::UserBufferIterator;

Modules

address 🔒
memory_set 🔒
page_table 🔒

Implementation of PageTableEntry and PageTable.

Functions

initiate heap allocator, frame allocator and kernel space