From cd287fe8cbcc7bb6ccf80b65fc5398f6b980eb4f Mon Sep 17 00:00:00 2001 From: Edgaru089 Date: Mon, 11 Oct 2021 23:35:54 +0800 Subject: [PATCH] memory: implement kMalloc() to use dlmalloc --- memory/memory.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/memory/memory.c b/memory/memory.c index 2e62c2d..ee97104 100644 --- a/memory/memory.c +++ b/memory/memory.c @@ -2,7 +2,7 @@ #include "../main.h" #include "memory.h" #include "../runtime/stdio.h" -#include "../extlib/liballoc/liballoc_1_1.h" +#include "../extlib/dlmalloc/malloc-2.8.6.h" #include @@ -23,14 +23,14 @@ void efiFree(void *data) { } void *kMalloc(size_t size) { - void *mem = liballoc_kmalloc(size); + void *mem = dlmalloc(size); io_Printf("kMalloc: size=%llu, pos=0x%llx\n", size, mem); return mem; } void kFree(void *data) { io_Printf("kFree: 0x%llx\n", data); - liballoc_kfree(data); + dlfree(data); } void *kMemoryMap(void *desiredVirtual, int pageCount, int protectionFlags, int flags, int fd) {