From 002d6f255f2c179bc8ab319ea63f8f2406b2aee8 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 20 Jan 2020 14:09:00 +0100 Subject: [PATCH] Set FixedSizeBlockAllocator as global allocator --- src/allocator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allocator.rs b/src/allocator.rs index b03d81b2..9ce4a887 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -1,6 +1,6 @@ use alloc::alloc::{GlobalAlloc, Layout}; use core::ptr::null_mut; -use linked_list::LinkedListAllocator; +use fixed_size_block::FixedSizeBlockAllocator; use x86_64::{ structures::paging::{ mapper::MapToError, FrameAllocator, Mapper, Page, PageTableFlags, Size4KiB, @@ -16,7 +16,7 @@ pub const HEAP_START: usize = 0x_4444_4444_0000; pub const HEAP_SIZE: usize = 100 * 1024; // 100 KiB #[global_allocator] -static ALLOCATOR: Locked = Locked::new(LinkedListAllocator::new()); +static ALLOCATOR: Locked = Locked::new(FixedSizeBlockAllocator::new()); pub fn init_heap( mapper: &mut impl Mapper,