pub struct Page(/* private fields */);
Expand description
A page of memory
This represents a single page of memory. When accessing memory, all the memory in the page is paged in and then accessible for the rest of the segment, at which point it is paged out.
Implementations§
Source§impl Page
impl Page
Sourcepub fn digest(&self) -> Digest
pub fn digest(&self) -> Digest
Produce the digest of this page
Hashes the data in this page to produce a digest wh∑ich can be used for verifying memory integrity.
Sourcepub fn load(&self, addr: WordAddr) -> u32
pub fn load(&self, addr: WordAddr) -> u32
Read a word from a page
Loads the data at addr
from this page. This only looks at the
subaddress, and does not check if the address belongs to this page.
Thus, if you pass a WordAddr belonging to a different page,
Page::load will load from the address in this page with the same
WordAddr::page_subaddr.
Sourcepub fn store(&mut self, addr: WordAddr, word: u32)
pub fn store(&mut self, addr: WordAddr, word: u32)
Store a word to this page
Stores the data word
to the address addr
in this page. This only
looks at the subaddress, and does not check if the address belongs to
this page. Thus, if you pass a WordAddr belonging to a different page,
Page::store will store to the address in this page with the same
WordAddr::page_subaddr.