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 memory_set::KERNEL_SPACE;
  • pub use memory_set::KERNEL_SPACE;

Modules§

Structs§

Functions§

  • Allocate a physical page frame in FrameTracker style
  • initiate heap allocator, frame allocator and kernel space
  • remap test in kernel space
  • Translate&Copy a ptru8 array with LENGTH len to a mutable u8 Vec through page table
  • Translate a ptru8 array through page table and return a mutable reference of T
  • Translate&Copy a ptru8 array end with \0 to a String Vec through page table