mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 16:33:24 +00:00
Inject a scalable buddy system allocator to OSTD
Co-authored-by: Zhe Tang <tangzh@stu.pku.edu.cn>
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
92bc8cbbf7
commit
5f05963ee5
@ -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")]
|
||||
|
Reference in New Issue
Block a user