ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation::memory::rmap::entry Struct Referenceexport

One reverse-map entry: identifies a single VMA slot that maps a given physical frame. More...

Collaboration diagram for zxfoundation::memory::rmap::entry:
[legend]

Data Fields

entrynext {nullptr}
vm::vm_regionregion {nullptr}
u32 slot_index {0}

Detailed Description

One reverse-map entry: identifies a single VMA slot that maps a given physical frame.

Stored in a per-PFN singly-linked intrusive list whose head lives in rmap_head (see rmap.cxxm). The link pointer is stored inside the entry itself (intrusive) so the entry can be allocated from a fixed-size pool indexed by nothing but its own address.

Lifetime:

  • rmap_insert is called by the VM fault path immediately after a slot is populated with a non-empty state pointing at a shared frame (CoW, file_cache, IPC, portal).
  • rmap_remove is called on slot.clear() (unmap, CoW copy, eviction, drain) before the slot is reset.
  • The walker rmap_for_each_phys lets a caller invoke a function pointer on every VMA slot that currently references a given phys, enabling peer TLB shootdown on CoW and peer invalidation on reclaim.

The documentation for this struct was generated from the following file: