docs.rs failed to build kernel-alloc-0.2.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
kernel-alloc-0.1.2
kernel-alloc-rs
Why?
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 or alloc::Allocator and the Rust book for global_allocator or allocator_api.
Example
Add the following to your code to define new global allocator:
use KernelAlloc;
static GLOBAL: KernelAlloc = KernelAlloc;
Add the following to your code to define new physical allocator:
use PhysicalAllocator;
static GLOBAL: PhysicalAllocator = PhysicalAllocator;
Credits / References
- https://www.vergiliusproject.com/
- @not-matthias, @jessiep_, @memN0ps