From 8176351e1a3d1598bedbc007897d530475942275 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 13 Mar 2021 13:33:26 +0100 Subject: Nicü --- libc/alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libc') diff --git a/libc/alloc.c b/libc/alloc.c index 083f2c0..4ccf35f 100644 --- a/libc/alloc.c +++ b/libc/alloc.c @@ -139,7 +139,7 @@ static void *_malloc(u32 req_size) l_mem_root = allocate_new_page(size); if (l_mem_root == NULL) { liballoc_unlock(); - return NULL; + panic("Malloc failed!\n"); } } @@ -295,6 +295,7 @@ static void *_malloc(u32 req_size) liballoc_unlock(); + panic("Malloc failed!\n"); return NULL; } @@ -361,6 +362,7 @@ static void *_realloc(void *ptr, u32 size) if (min->magic != LIBALLOC_MAGIC) { liballoc_unlock(); + panic("Malloc failed!\n"); return NULL; } -- cgit v1.2.3