From 945c215b72af4c9e89495d18ba93018c0feccc02 Mon Sep 17 00:00:00 2001 From: Julian Barathieu Date: Wed, 15 May 2019 16:39:20 +0200 Subject: [PATCH] malloc() fix --- kaleid/libc/mem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kaleid/libc/mem.c b/kaleid/libc/mem.c index ae8f2d5..5fe84db 100644 --- a/kaleid/libc/mem.c +++ b/kaleid/libc/mem.c @@ -36,7 +36,11 @@ void *malloc(size_t n) void *ptr; error_t rc; +#ifndef _KALEID_KERNEL rc = KalAllocMemory(&ptr, n); +#else + rc = KalAllocMemoryEx(&ptr, n, M_ZEROED, 0) +#endif if (rc > 0) seterrno(rc); return ptr;