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

Method allocate_frame

kernel/src/memory/frame_allocator.rs:386–393  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

384
385unsafe impl FrameAllocator<Size4KiB> for MultilevelBitmapFrameAllocator {
386 fn allocate_frame(&mut self) -> Option<PhysFrame> {
387 if let Some(frame_number) = self.fetch_frame() {
388 // Convert from frame number to physical address
389 return PhysFrame::from_start_address(
390 self.frame_phys_addr + frame_number * 4096).ok();
391 }
392 None
393 }
394}
395
396#[test_case]

Callers 7

create_empty_pagetableFunction · 0.80
allocate_pages_mapperFunction · 0.80
allocate_user_stackFunction · 0.80
initFunction · 0.80
test_level2_clearedFunction · 0.80

Calls 1

fetch_frameMethod · 0.80

Tested by 1

test_level2_clearedFunction · 0.64