From 66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Tue, 1 May 2012 10:39:33 +0200 Subject: It's alive! Or is it? No, it's not. --- src/kernel/config.h | 2 +- src/kernel/core/test.c | 2 +- src/kernel/mem/heap.std.h | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/config.h b/src/kernel/config.h index ccad9cf..38487dc 100644 --- a/src/kernel/config.h +++ b/src/kernel/config.h @@ -10,6 +10,6 @@ - Basic implementation, slow but bug-free - Standard implementation, efficient, buggy, based on the heap code from JamesM's OSDev tutorial Comment the following define to use the second version */ -#define K_USE_BASIC_HEAP +// #define K_USE_BASIC_HEAP #endif diff --git a/src/kernel/core/test.c b/src/kernel/core/test.c index 867a4b5..8f7b32c 100644 --- a/src/kernel/core/test.c +++ b/src/kernel/core/test.c @@ -8,7 +8,7 @@ static void test_run_kmalloc() { int alloc_sizes[8] = { 10, 32, 16, 20, 64, 128, 32, 48 }; int *ptrs[8] = { 0 }; int t, i; - for (t = 0; t < 2; t++) { + for (t = 0; t < 4; t++) { for (i = 0; i < 8; i++) { monitor_writeDec(i); monitor_write(" alloc "); monitor_writeDec(alloc_sizes[i]); monitor_write(" : "); diff --git a/src/kernel/mem/heap.std.h b/src/kernel/mem/heap.std.h index a7ba173..fa146ae 100644 --- a/src/kernel/mem/heap.std.h +++ b/src/kernel/mem/heap.std.h @@ -1,8 +1,6 @@ #ifndef DEF_HEAP_H #define DEF_HEAP_H -#error "Using standard heap ! It's all buggy everywhere !" - /* The heap is the data structure that permits allocating and freeing memory easily. The functions in this file are only used by mem.c, which provides kmalloc and kfree. The heap algorithm used is based on the one described here : -- cgit v1.2.3