From ea0e5d630c571bef0f02e6ef2d2058e14faf2ec3 Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 27 Nov 2025 03:06:11 +0100 Subject: [common] remove HeapTracker (#3001) Should fix a bunch of leaks on Android? - PLEASE CHECK UE4 GAMES Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3001 Reviewed-by: Maufeat Reviewed-by: Caio Oliveira Co-authored-by: lizzie Co-committed-by: lizzie --- src/core/memory.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/core/memory.cpp') diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 2583aae867..6ce6836146 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -15,7 +15,6 @@ #include "common/assert.h" #include "common/atomic_ops.h" #include "common/common_types.h" -#include "common/heap_tracker.h" #include "common/logging/log.h" #include "common/page_table.h" #include "common/scope_exit.h" @@ -59,13 +58,7 @@ struct Memory::Impl { } else { current_page_table->fastmem_arena = nullptr; } - -#ifdef __linux__ - heap_tracker.emplace(system.DeviceMemory().buffer); - buffer = std::addressof(*heap_tracker); -#else buffer = std::addressof(system.DeviceMemory().buffer); -#endif } void MapMemoryRegion(Common::PageTable& page_table, Common::ProcessAddress base, u64 size, @@ -1023,13 +1016,7 @@ struct Memory::Impl { std::array, Core::Hardware::NUM_CPU_CORES> scratch_buffers{}; std::span gpu_dirty_managers; std::mutex sys_core_guard; - - std::optional heap_tracker; -#ifdef __linux__ - Common::HeapTracker* buffer{}; -#else Common::HostMemory* buffer{}; -#endif }; Memory::Memory(Core::System& system_) : system{system_} { @@ -1230,22 +1217,11 @@ bool Memory::InvalidateNCE(Common::ProcessAddress vaddr, size_t size) { if (rasterizer) { impl->InvalidateGPUMemory(ptr, size); } - -#ifdef __linux__ - if (!rasterizer && mapped) { - impl->buffer->DeferredMapSeparateHeap(GetInteger(vaddr)); - } -#endif - return mapped && ptr != nullptr; } bool Memory::InvalidateSeparateHeap(void* fault_address) { -#ifdef __linux__ - return impl->buffer->DeferredMapSeparateHeap(static_cast(fault_address)); -#else return false; -#endif } } // namespace Core::Memory -- cgit v1.2.3