pub struct StaleTLBEntry(Va, Page);Expand description
Struct for invalidating the TLB (Translation Lookaside Buffer) entry.
This struct is responsible for invalidating a TLB entry associated with a
specific virtual address (Va). TLB entries are cached mappings between
virtual addresses and physical addresses, and they need to be invalidated
when the corresponding page table entries are modified or removed.
This struct provides methods for invalidating the TLB entry and safely forgetting the modification. This internally holds the page to be invalidated, to delay the free until the tlb entry is invalidated.
Tuple Fields§
§0: Va§1: PageImplementations§
Source§impl StaleTLBEntry
impl StaleTLBEntry
Sourcepub fn invalidate(self) -> Page
pub fn invalidate(self) -> Page
Invalidate the underlying virtual address.
This method issues an assembly instruction to invalidate the TLB entry corresponding to the given virtual address. The invalidation ensures that any cached translations are cleared and that the system will use the updated page table entries for subsequent address lookups.
Methods from Deref<Target = Page>§
Sourcepub fn inner(&self) -> &[u8]
pub fn inner(&self) -> &[u8]
Get a reference to the underlying slice of the page (read-only).
This method allows access to the contents of the page as a byte slice. The caller can read from the page’s memory, but cannot modify it.
§Returns
- A reference to the byte slice representing the contents of the page.
Sourcepub fn inner_mut(&mut self) -> &mut [u8]
pub fn inner_mut(&mut self) -> &mut [u8]
Get a mutable reference to the underlying slice of the page.
This method allows modification of the contents of the page as a byte slice. The caller can read from and write to the page’s memory.
§Returns
- A mutable reference to the byte slice representing the contents of the page.