ZXFoundation™ 26h2
Loading...
Searching...
No Matches
zxfoundation::memory::pmm::detail::buddy_zone Struct Reference

Per-zone buddy allocator state. More...

Public Member Functions

auto pop (u32 ord) noexcept -> u64
 Pop head block from order-ord free list.
auto push (u32 ord, u64 phys) noexcept -> void
 Push block to the head of order-ord free list.
auto remove (u32 ord, u64 phys) noexcept -> void
 Remove a specific block from the order-ord free list (O(1)).

Data Fields

u64 counts [MAX_ORDER+1] {}
 Count of free blocks at each order.
u64 heads [MAX_ORDER+1] {}
 Head physical address of each order's free list.

Static Public Attributes

static constexpr u64 EMPTY = 0

Detailed Description

Per-zone buddy allocator state.

Member Function Documentation

◆ pop()

auto zxfoundation::memory::pmm::detail::buddy_zone::pop ( u32 ord) ->u64
inlinenoexcept

Pop head block from order-ord free list.

Returns
Physical base address, or 0 if empty.

The documentation for this struct was generated from the following file:
  • zxfoundation/memory/pmm.zcomponent/core.cxx