From 91bde2cbfa9121b548145b413b49b5d9f31c60b2 Mon Sep 17 00:00:00 2001 From: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com> Date: Wed, 16 Jul 2025 12:57:45 +0200 Subject: [PATCH] Change heap API functions to the internal libc functions --- src/core/linker.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/linker.cpp b/src/core/linker.cpp index f2c75c85c..80c3f5ea3 100644 --- a/src/core/linker.cpp +++ b/src/core/linker.cpp @@ -15,6 +15,7 @@ #include "core/devtools/widget/module_list.h" #include "core/libraries/kernel/memory.h" #include "core/libraries/kernel/threads.h" +#include "core/libraries/libc_internal/libc_internal_memory.h" #include "core/linker.h" #include "core/memory.h" #include "core/tls.h" @@ -50,12 +51,12 @@ static PS4_SYSV_ABI void* RunMainEntry [[noreturn]] (EntryParams* params) { #endif Linker::Linker() - : memory{Memory::Instance()}, heap_api{new HeapAPI{.heap_malloc = &std::malloc, - .heap_free = &std::free, - .heap_calloc = &std::calloc, - .heap_realloc = &std::realloc, + : memory{Memory::Instance()}, heap_api{new HeapAPI{.heap_malloc = &Libraries::LibcInternal::internal_malloc, + .heap_free = &Libraries::LibcInternal::internal_free, + .heap_calloc = &Libraries::LibcInternal::internal_calloc, + .heap_realloc = &Libraries::LibcInternal::internal_realloc, .heap_memalign = nullptr, - .heap_posix_memalign = nullptr, + .heap_posix_memalign = Libraries::LibcInternal::internal_posix_memalign, .heap_reallocalign = nullptr, .heap_malloc_stats = nullptr, .heap_malloc_usable_size = nullptr}} {}