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

Method map

src/memory/paging/temporary_page.rs:24–31  ·  view source on GitHub ↗

Maps the temporary page to the given frame in the active table. Returns the start address of the temporary page.

(&mut self, frame: Frame, active_table: &mut ActivePageTable)

Source from the content-addressed store, hash-verified

22 /// Maps the temporary page to the given frame in the active table.
23 /// Returns the start address of the temporary page.
24 pub fn map(&mut self, frame: Frame, active_table: &mut ActivePageTable) -> VirtualAddress {
25 use super::entry::WRITABLE;
26
27 assert!(active_table.translate_page(self.page).is_none(),
28 "temporary page is already mapped");
29 active_table.map_to(self.page, frame, WRITABLE, &mut self.allocator);
30 self.page.start_address()
31 }
32
33 /// Unmaps the temporary page in the active table.
34 pub fn unmap(&mut self, active_table: &mut ActivePageTable) {

Callers 1

map_table_frameMethod · 0.45

Calls 2

map_toMethod · 0.45
start_addressMethod · 0.45

Tested by

no test coverage detected