Inject a scalable buddy system allocator to OSTD

Co-authored-by: Zhe Tang <tangzh@stu.pku.edu.cn>
This commit is contained in:
Zhang Junyang
2025-03-11 16:57:10 +08:00
committed by Tate, Hongliang Tian
parent 92bc8cbbf7
commit 5f05963ee5
27 changed files with 1301 additions and 236 deletions

View File

@ -67,6 +67,13 @@ pub use self::{error::Error, prelude::Result};
#[doc(hidden)]
unsafe fn init() {
arch::enable_cpu_features();
// SAFETY: This function is called only once, before `allocator::init`
// and after memory regions are initialized.
unsafe {
mm::frame::allocator::init_early_allocator();
}
arch::serial::init();
#[cfg(feature = "cvm_guest")]