MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / test_level2_cleared

Function test_level2_cleared

kernel/src/memory/frame_allocator.rs:408–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

406
407#[test_case]
408fn test_level2_cleared() {
409 let memory_info = unsafe {MEMORY_INFO.as_mut().unwrap()};
410 let mut alloc = &mut memory_info.frame_allocator;
411
412 let frame1 = alloc.fetch_frame();
413 // Move to next level-1 frame
414 for i in 0..32 {
415 alloc.allocate_frame();
416 }
417 let frame2 = alloc.fetch_frame();
418 assert!(frame1 != frame2);
419}
420
421#[test_case]
422fn test_quick_return() {

Callers

nothing calls this directly

Calls 2

fetch_frameMethod · 0.80
allocate_frameMethod · 0.80

Tested by

no test coverage detected