Uses new Rust 2021
|new 0.2.1||Jan 24, 2023|
|0.2.0||Jan 24, 2023|
|0.1.2||Jan 19, 2022|
|0.1.1||Jan 19, 2022|
|0.1.0||Aug 21, 2020|
#133 in Memory management
74 downloads per month
Rust has many useful abstractions and utils that require heap allocations.
Box are some of them. To be able to use them, we need to allocate memory at runtime, which requires a custom allocator.
Add the following to your code to define new global allocator:
use kernel_alloc::KernelAlloc; #[global_allocator] static GLOBAL: KernelAlloc = KernelAlloc;
Add the following to your code to define new physical allocator:
use kernel_alloc::PhysicalAllocator; #[global_allocator] static GLOBAL: PhysicalAllocator = PhysicalAllocator;