mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-24 16:42:36 +02:00
"Third-party" is a Googleism that doesn't make much sense otherwise. Most references to crates just say "crate", implying that they are open-source packages available on https://crates.io, so this updates a few additional locations to do the same.
945 B
945 B
buddy_system_allocator
buddy_system_allocator
is a crate implementing a basic buddy system
allocator. It can be used both for LockedHeap
implementing
GlobalAlloc
so you can use the standard alloc
crate (as we saw
before), or for allocating other address space. For example, we might want
to allocate MMIO space for PCI BARs:
{{#include allocator-example/src/main.rs:main}}
- PCI BARs always have alignment equal to their size.
- Run the example with
cargo run
undersrc/bare-metal/useful-crates/allocator-example/
. (It won't run in the Playground because of the crate dependency.)