(&mut self,
index: usize,
allocator: &mut A)
| 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 | |
| 71 | impl<L> Index<usize> for Table<L> where L: TableLevel |
no test coverage detected