aboutsummaryrefslogtreecommitdiff
path: root/lib/heap/heap_wrapper.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/heap/heap_wrapper.c')
-rw-r--r--lib/heap/heap_wrapper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/heap/heap_wrapper.c b/lib/heap/heap_wrapper.c
index ea012191..1aa9ac37 100644
--- a/lib/heap/heap_wrapper.c
+++ b/lib/heap/heap_wrapper.c
@@ -64,6 +64,9 @@ static inline void HEAP_INIT(void)
/* start the heap off with some spare memory in the page allocator */
size_t len;
void *ptr = page_first_alloc(&len);
+ if (!ptr) {
+ panic("heap init failed");
+ }
miniheap_init(ptr, len);
}
#define HEAP_DUMP miniheap_dump