MCPcopy Create free account
hub / github.com/chyyuu/os_kernel_lab / frame_allocator_test

Function frame_allocator_test

os/src/mm/frame_allocator.rs:112–127  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110
111#[allow(unused)]
112pub fn frame_allocator_test() {
113 let mut v: Vec<FrameTracker> = Vec::new();
114 for i in 0..5 {
115 let frame = frame_alloc().unwrap();
116 println!("{:?}", frame);
117 v.push(frame);
118 }
119 v.clear();
120 for i in 0..5 {
121 let frame = frame_alloc().unwrap();
122 println!("{:?}", frame);
123 v.push(frame);
124 }
125 drop(v);
126 println!("frame_allocator_test passed!");
127}

Callers

nothing calls this directly

Calls 4

frame_allocFunction · 0.85
dropFunction · 0.85
clearMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected