MCPcopy Create free account
hub / github.com/Infinity-OS/infinity / next_table_create

Method next_table_create

src/memory/paging/table.rs:54–68  ·  view source on GitHub ↗
(&mut self,
                                index: usize,
                                allocator: &mut A)

Source from the content-addressed store, hash-verified

52 }
53
54 pub fn next_table_create<A>(&mut self,
55 index: usize,
56 allocator: &mut A)
57 -> &mut Table<L::NextLevel>
58 where A: FrameAllocator
59 {
60 if self.next_table(index).is_none() {
61 assert!(!self.entries[index].flags().contains(HUGE_PAGE),
62 "mapping code does not support huge pages");
63 let frame = allocator.allocate_frame().expect("no frames available");
64 self.entries[index].set(frame, PRESENT | WRITABLE);
65 self.next_table_mut(index).unwrap().zero();
66 }
67 self.next_table_mut(index).unwrap()
68 }
69}
70
71impl<L> Index<usize> for Table<L> where L: TableLevel

Callers 1

map_toMethod · 0.80

Calls 5

next_tableMethod · 0.80
setMethod · 0.80
zeroMethod · 0.80
next_table_mutMethod · 0.80
allocate_frameMethod · 0.45

Tested by

no test coverage detected