summaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-01 10:39:33 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-01 10:39:33 +0200
commit66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5 (patch)
tree3b728f4c8dc93f6ab9237af3d32410346b617ae8 /src/kernel
parent07b15b375ee7cc87f476200b2fd6205959ac0ba4 (diff)
downloadTCE-66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5.tar.gz
TCE-66b32658d2e5aa99493dcb3abcb73cdb2cc6f0b5.zip
It's alive! Or is it? No, it's not.
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/config.h2
-rw-r--r--src/kernel/core/test.c2
-rw-r--r--src/kernel/mem/heap.std.h2
3 files changed, 2 insertions, 4 deletions
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 :