Use new hole_list_allocator instead of bump_allocator

This commit is contained in:
Philipp Oppermann
2016-04-12 00:39:45 +02:00
parent 6a45b29560
commit 2b85f38b41
3 changed files with 10 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ extern crate x86;
#[macro_use]
extern crate once;
extern crate bump_allocator;
extern crate hole_list_allocator;
extern crate alloc;
#[macro_use]
extern crate collections;
@@ -46,6 +46,10 @@ pub extern "C" fn rust_main(multiboot_information_address: usize) {
use alloc::boxed::Box;
let heap_test = Box::new(42);
for i in 0..10000 {
format!("Some String");
}
println!("It did not crash!");
loop {}

View File

@@ -46,8 +46,8 @@ pub fn init(boot_info: &BootInformation) {
let mut active_table = paging::remap_the_kernel(&mut frame_allocator,
boot_info);
use self::paging::{Page, WRITABLE};
use bump_allocator::{HEAP_START, HEAP_SIZE};
use self::paging::Page;
use hole_list_allocator::{HEAP_START, HEAP_SIZE};
let heap_start_page = Page::containing_address(HEAP_START);
let heap_end_page = Page::containing_address(HEAP_START + HEAP_SIZE-1);