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

Method next_table_address

src/memory/paging/table.rs:34–42  ·  view source on GitHub ↗
(&self, index: usize)

Source from the content-addressed store, hash-verified

32impl<L> Table<L> where L: HierarchicalLevel
33{
34 fn next_table_address(&self, index: usize) -> Option<usize> {
35 let entry_flags = self[index].flags();
36 if entry_flags.contains(PRESENT) && !entry_flags.contains(HUGE_PAGE) {
37 let table_address = self as *const _ as usize;
38 Some((table_address << 9) | (index << 12))
39 } else {
40 None
41 }
42 }
43
44 pub fn next_table(&self, index: usize) -> Option<&Table<L::NextLevel>> {
45 self.next_table_address(index)

Callers 2

next_tableMethod · 0.80
next_table_mutMethod · 0.80

Calls 1

flagsMethod · 0.80

Tested by

no test coverage detected