pub fn release_owned_block(block: PhysBlock<Released>)Expand description
Releases a block back to the buddy allocator.
Lifecycle order:
- Invoke per-block
FrameMetaVtable::on_last_ref(once, for the head frame) : signals that the last shared ownership reference has been dropped. - Invoke per-page
FrameMetaVtable::on_unmaphooks (once per constituent 4 KiB page) : signals that mappings are being torn down. - Return the block to buddy. Poisoned frames (
meta_guard::POISONED) are quarantined and not recycled (poison_quarantine_pages_snapshot).
ยงHook ordering guarantee
on_last_ref and on_unmap are called before the buddy allocator decides to recycle
or quarantine. Hooks that rely on the frame being recyclable may run pointlessly on
poisoned blocks : they must therefore be idempotent and side-effect-safe.