#frame #buddy #kernel #pool #osdk #shipped #metadata

osdk-frame-allocator

The default buddy system frame allocator shipped with OSDK

3 unstable releases

new 0.14.1 Mar 22, 2025
0.14.0 Mar 20, 2025
0.13.0 Mar 14, 2025

#172 in Memory management

Download history 53/week @ 2025-03-08 135/week @ 2025-03-15

188 downloads per month

MPL-2.0 license

1MB
19K SLoC

osdk-frame-allocator

This is the default buddy system frame allocator shipped with OSDK. It relies on the physical frame metadata system in OSTD to provide a heap-free implementation of a buddy system allocator for OS kernels. It also features per-CPU caches and pools for scalable allocations.

This crate is part of the Asterinas project.


lib.rs:

An implementation of the global physical memory frame allocator for OSTD based kernels.

Background

OSTD has provided a page allocator interface, namely GlobalFrameAllocator and global_frame_allocator procedure macro, allowing users to plug in their own frame allocator into the kernel safely. You can refer to the ostd::mm::frame::allocator module for detailed introduction.

Introduction

This crate is an implementation of a scalable and efficient global frame allocator based on the buddy system. It is by default shipped with OSDK for users that don't have special requirements on the frame allocator.

Dependencies

~4–6MB
~118K SLoC