[−][src]Crate kernel_alloc
Rust has many useful abstractions and utils that require heap allocations.
String
, Vec
and Box
are some of them. To be able to use them, we need
to allocate memory at runtime, which requires a custom allocator.
If you want to find out more about it, please refer to the alloc::GlobalAllocator and the Rust book.
Example
Add the following to your code to define new global allocator:
use kernel_alloc::KernelAlloc; #[global_allocator] static GLOBAL: KernelAlloc = KernelAlloc;
Structs
KernelAlloc | The global kernel allocator structure. |