diff options
| author | Michael Brown | 2005-04-08 17:01:17 +0200 |
|---|---|---|
| committer | Michael Brown | 2005-04-08 17:01:17 +0200 |
| commit | 0ff80b477dcff0726ebdbed95e8a93971e59e82b (patch) | |
| tree | 860b7150212a07c24a9529ea072f3fb12700974c /src/core/heap.c | |
| parent | Merged this file into HEAD (diff) | |
| download | ipxe-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.c | 13 |
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 ); |
