mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Test: allocate all frames
This commit is contained in:
@@ -57,6 +57,13 @@ pub extern fn rust_main(multiboot_information_address: usize) {
|
|||||||
let mut frame_allocator = memory::AreaFrameAllocator::new(kernel_start as usize,
|
let mut frame_allocator = memory::AreaFrameAllocator::new(kernel_start as usize,
|
||||||
kernel_end as usize, multiboot_start, multiboot_end, memory_map_tag.memory_areas());
|
kernel_end as usize, multiboot_start, multiboot_end, memory_map_tag.memory_areas());
|
||||||
|
|
||||||
|
for i in 0.. {
|
||||||
|
if let None = frame_allocator.allocate_frame() {
|
||||||
|
println!("allocated {} frames", i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
loop{}
|
loop{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user