Skip to content

Commit

Permalink
disable temporary system allocator
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Sep 24, 2020
1 parent c843ae0 commit 088a5be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mm/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use alloc::alloc::Layout;
use core::alloc::GlobalAlloc;

/// Size of the preallocated space for the Bootstrap Allocator.
const BOOTSTRAP_HEAP_SIZE: usize = 0x1000;
const BOOTSTRAP_HEAP_SIZE: usize = 0x140000;

/// Alignment of pointers returned by the Bootstrap Allocator.
/// Note that you also have to align the HermitAllocatorInfo structure!
Expand All @@ -41,7 +41,7 @@ struct AllocatorInfo {
impl AllocatorInfo {
const fn new() -> AllocatorInfo {
AllocatorInfo {
heap: [0xCC; BOOTSTRAP_HEAP_SIZE],
heap: [0x00; BOOTSTRAP_HEAP_SIZE],
index: 0,
is_bootstrapping: true,
}
Expand Down Expand Up @@ -127,7 +127,7 @@ fn dealloc_system(virtual_address: usize, layout: Layout) {
}

pub fn init() {
unsafe {
/*unsafe {
ALLOCATOR_INFO.switch_to_system_allocator();
}
}*/
}

0 comments on commit 088a5be

Please sign in to comment.