summaryrefslogtreecommitdiffstats
path: root/src/core/heap.c
diff options
context:
space:
mode:
authorMichael Brown2005-04-08 17:01:17 +0200
committerMichael Brown2005-04-08 17:01:17 +0200
commit0ff80b477dcff0726ebdbed95e8a93971e59e82b (patch)
tree860b7150212a07c24a9529ea072f3fb12700974c /src/core/heap.c
parentMerged this file into HEAD (diff)
downloadipxe-0ff80b477dcff0726ebdbed95e8a93971e59e82b.tar.gz
ipxe-0ff80b477dcff0726ebdbed95e8a93971e59e82b.tar.xz
ipxe-0ff80b477dcff0726ebdbed95e8a93971e59e82b.zip
Merged mcb30-realmode-redesign back to HEAD
Diffstat (limited to 'src/core/heap.c')
-rw-r--r--src/core/heap.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/heap.c b/src/core/heap.c
index 51ce47d75..7f69829df 100644
--- a/src/core/heap.c
+++ b/src/core/heap.c
@@ -1,8 +1,12 @@
#include "etherboot.h"
+#include "init.h"
+#include "memsizes.h"
size_t heap_ptr, heap_top, heap_bot;
-void init_heap(void)
+#define _virt_start 0
+
+static void init_heap(void)
{
size_t size;
size_t start, end;
@@ -82,6 +86,11 @@ void init_heap(void)
heap_ptr = heap_bot;
}
+static void reset_heap(void)
+{
+ heap_ptr = heap_bot;
+}
+
void *allot(size_t size)
{
void *ptr;
@@ -166,3 +175,5 @@ void forget2(void *ptr)
}
heap_ptr = addr;
}
+
+INIT_FN ( INIT_HEAP, init_heap, reset_heap, NULL );