From 45bfdffcb2e00fda595b3f9318469f6b0d29cbe4 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 18 May 2021 22:06:59 +0200 Subject: Fixed issues with intel emulation --- libs/libc/alloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libs/libc/alloc.c') diff --git a/libs/libc/alloc.c b/libs/libc/alloc.c index bc48502..ea01a38 100644 --- a/libs/libc/alloc.c +++ b/libs/libc/alloc.c @@ -125,7 +125,7 @@ void *_malloc(u32 req_size) if (size == 0) { liballoc_unlock(); - return malloc(1); + return _malloc(1); } if (l_mem_root == NULL) { @@ -338,12 +338,12 @@ void *_realloc(void *ptr, u32 size) size = ALIGN_UP(size, 16); if (size == 0) { - free(ptr); + _free(ptr); return NULL; } if (ptr == NULL) - return malloc(size); + return _malloc(size); liballoc_lock(); struct liballoc_minor *min = (struct liballoc_minor *)((u32)ptr - MINOR_SIZE); @@ -361,9 +361,9 @@ void *_realloc(void *ptr, u32 size) liballoc_unlock(); - void *new_ptr = malloc(size); + void *new_ptr = _malloc(size); memcpy(new_ptr, ptr, min->req_size); - free(ptr); + _free(ptr); return new_ptr; } -- cgit v1.2.3