mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 14:27:49 +00:00
Update Allocator Designs post for #806
This commit is contained in:
@@ -774,8 +774,6 @@ In the second step it uses the [`max`] method to enforce a minimum allocation si
|
||||
[`pad_to_align`]: https://doc.rust-lang.org/core/alloc/struct.Layout.html#method.pad_to_align
|
||||
[`max`]: https://doc.rust-lang.org/std/cmp/trait.Ord.html#method.max
|
||||
|
||||
Both the `align_to` and the `pad_to_align` methods are still unstable. To enable then, we need to add **`#![feature(alloc_layout_extra)]`** to the beginning of our `lib.rs`.
|
||||
|
||||
### Using it
|
||||
|
||||
We can now update the `ALLOCATOR` static in the `allocator` module to use our new `LinkedListAllocator`:
|
||||
|
||||
Reference in New Issue
Block a user