1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-04-24 16:42:36 +02:00
Dustin J. Mitchell de8ae4fe08
Remove the phrase "third-party" ()
"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.
2024-12-13 09:33:58 +00:00

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 under src/bare-metal/useful-crates/allocator-example/. (It won't run in the Playground because of the crate dependency.)