aboutsummaryrefslogtreecommitdiff
path: root/libs/libc/alloc.c
diff options
context:
space:
mode:
authorMarvin Borner2021-05-18 22:06:59 +0200
committerMarvin Borner2021-05-18 22:07:19 +0200
commit45bfdffcb2e00fda595b3f9318469f6b0d29cbe4 (patch)
treef78d66a7687aeb5c4fe4806adf60f70bab95dd9b /libs/libc/alloc.c
parentc905cd632cc7c5fa8e61eae7c00ed8e14743ced9 (diff)
Fixed issues with intel emulation
Diffstat (limited to 'libs/libc/alloc.c')
-rw-r--r--libs/libc/alloc.c10
1 files changed, 5 insertions, 5 deletions
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;
}