summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stage3/heap.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/stage3/heap.c b/stage3/heap.c
index c9e7edb..71bbf7d 100644
--- a/stage3/heap.c
+++ b/stage3/heap.c
@@ -25,12 +25,6 @@ void free(void *ptr)
h->next = next;
}
-static void defragment()
-{
- //usize num_blocks = 0;
- panic(S("defragment not implemented"));
-}
-
void *try_malloc(usize size)
{
for (Header *prev = free_ptr;; prev = prev->next) {
@@ -64,10 +58,6 @@ void *malloc(usize size)
{
void *p;
- // p = try_malloc(size);
- // if (p) return p;
- // defragment();
-
p = try_malloc(size);
if (p) return p;
panic(S("out of memory"));