summaryrefslogtreecommitdiff
path: root/stage3/heap.c
diff options
context:
space:
mode:
Diffstat (limited to 'stage3/heap.c')
-rw-r--r--stage3/heap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stage3/heap.c b/stage3/heap.c
index 2909ba7..dd1b23a 100644
--- a/stage3/heap.c
+++ b/stage3/heap.c
@@ -46,7 +46,7 @@ void *try_malloc(usize size)
prev->next = h->next;
} else {
// split
- h->size -= size;
+ h->size -= size + sizeof(Header);
h = ((void *) h) + sizeof(Header) + h->size;
h->size = size;
}