proka_kernel/memory/
mod.rs1pub mod allocator;
2pub mod frame_allocator;
3pub mod paging;
4pub mod protection;
5
6pub fn init() {
7 let memory_map_response = crate::MEMORY_MAP_REQUEST
8 .get_response()
9 .expect("Failed to get memory map response");
10 let hhdm_offset = paging::get_hhdm_offset();
11 let mut mapper = unsafe { paging::init_offset_page_table(hhdm_offset) };
12 let mut frame_allocator = unsafe { paging::init_frame_allocator(memory_map_response) };
13 allocator::init_heap(&mut mapper, &mut frame_allocator).expect("Failed to init heap");
14
15 paging::print_memory_stats(&frame_allocator);
17}