rCore-Tutorial-v3/os/src/mm/mod.rs

20 lines
578 B
Rust
Raw Normal View History

mod heap_allocator;
2020-12-03 06:40:30 +04:00
mod address;
mod frame_allocator;
2020-12-04 13:23:35 +04:00
mod page_table;
mod memory_set;
2020-12-04 13:23:35 +04:00
use page_table::{PageTable, PTEFlags};
use address::{VPNRange, StepByOne};
2020-12-03 06:40:30 +04:00
pub use address::{PhysAddr, VirtAddr, PhysPageNum, VirtPageNum};
pub use frame_allocator::{FrameTracker, frame_alloc};
2020-12-07 14:07:19 +04:00
pub use page_table::{PageTableEntry, translated_byte_buffer};
pub use memory_set::{MemorySet, KERNEL_SPACE, MapPermission};
2020-12-04 13:23:35 +04:00
pub use memory_set::remap_test;
2020-12-03 06:40:30 +04:00
pub fn init() {
heap_allocator::init_heap();
frame_allocator::init_frame_allocator();
2020-12-04 13:23:35 +04:00
KERNEL_SPACE.clone().lock().activate();
2020-12-03 06:40:30 +04:00
}