malloc() fix

This commit is contained in:
Julian Barathieu 2019-05-15 16:39:20 +02:00
parent 2c7967f772
commit 945c215b72
1 changed files with 4 additions and 0 deletions

View File

@ -36,7 +36,11 @@ void *malloc(size_t n)
void *ptr; void *ptr;
error_t rc; error_t rc;
#ifndef _KALEID_KERNEL
rc = KalAllocMemory(&ptr, n); rc = KalAllocMemory(&ptr, n);
#else
rc = KalAllocMemoryEx(&ptr, n, M_ZEROED, 0)
#endif
if (rc > 0) seterrno(rc); if (rc > 0) seterrno(rc);
return ptr; return ptr;