mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Merge branch 'post-11' into post-12
This commit is contained in:
@@ -31,8 +31,9 @@ pub struct FixedSizeBlockAllocator {
|
|||||||
impl FixedSizeBlockAllocator {
|
impl FixedSizeBlockAllocator {
|
||||||
/// Creates an empty FixedSizeBlockAllocator.
|
/// Creates an empty FixedSizeBlockAllocator.
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
|
const EMPTY: Option<&'static mut ListNode> = None;
|
||||||
FixedSizeBlockAllocator {
|
FixedSizeBlockAllocator {
|
||||||
list_heads: [None; BLOCK_SIZES.len()],
|
list_heads: [EMPTY; BLOCK_SIZES.len()],
|
||||||
fallback_allocator: linked_list_allocator::Heap::empty(),
|
fallback_allocator: linked_list_allocator::Heap::empty(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#![feature(abi_x86_interrupt)]
|
#![feature(abi_x86_interrupt)]
|
||||||
#![feature(alloc_error_handler)]
|
#![feature(alloc_error_handler)]
|
||||||
#![feature(const_mut_refs)]
|
#![feature(const_mut_refs)]
|
||||||
#![feature(const_in_array_repeat_expressions)]
|
|
||||||
#![feature(wake_trait)]
|
#![feature(wake_trait)]
|
||||||
#![test_runner(crate::test_runner)]
|
#![test_runner(crate::test_runner)]
|
||||||
#![reexport_test_harness_main = "test_main"]
|
#![reexport_test_harness_main = "test_main"]
|
||||||
|
|||||||
Reference in New Issue
Block a user