Re-write chunk-splitting and add unit tests

This commit is contained in:
Zhang Junyang
2025-03-20 16:33:44 +08:00
committed by Tate, Hongliang Tian
parent ba0dc8c122
commit d8e076f58a
4 changed files with 204 additions and 21 deletions

View File

@ -22,6 +22,12 @@
//! [`GlobalFrameAllocator`]: ostd::mm::GlobalFrameAllocator
//! [`global_frame_allocator`]: ostd::global_frame_allocator
// The heap allocator usually depends on frame allocation. If we depend on heap
// allocation then there will be a cyclic dependency. We only use the heap in
// unit tests.
#[cfg(ktest)]
extern crate alloc;
use core::alloc::Layout;
use ostd::{