#[repr(C, align(32))]pub struct PageFrame {
pub flags: PageFlags,
pub order: u8,
pub next: u32,
pub prev: u32,
pub size_class: u8,
pub rc: u16,
pub freelist_va: usize,
pub _pad: u8,
}Expand description
Metadata associated with a single physical page frame.
This structure stores per‑frame information required by the page frame manager, such as flags, allocation order, linked list pointers for free lists, reference count, and a pointer to the kernel virtual address of the freelist header (if any). It is guaranteed to be 32‑byte aligned.
Fields§
§flags: PageFlagsPage state flags (locked, dirty, reserved, etc.).
order: u8Allocation order (2^order pages). 0 means a single 4 KiB page.
next: u32Index of the next page frame in a linked list (e.g., free list).
prev: u32Index of the previous page frame in a linked list.
size_class: u8Size class index for slab allocators (if used).
rc: u16Reference count: number of users of this page frame.
freelist_va: usizeKernel virtual address of the freelist header (or 0 if none).
_pad: u8Padding to maintain alignment and reserved for future use.