Files
termux-packages/packages/fex/disable_jemalloc_fix.patch
termux-pacman-bot 4778e6ee09 packages/fex
2022-08-14 03:04:49 +00:00

30 lines
908 B
Diff

diff --git a/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp b/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp
index a825d29b..8fdd35f6 100644
--- a/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp
+++ b/External/FEXCore/Source/Interface/HLE/Thunks/Thunks.cpp
@@ -28,7 +28,9 @@ $end_info$
#include <string>
#include <utility>
+#ifdef ENABLE_JEMALLOC
#include "jemalloc/jemalloc.h"
+#endif
struct LoadlibArgs {
const char *Name;
@@ -241,12 +243,14 @@ namespace FEXCore {
* and host heap pointers.
*/
static void IsHostHeapAllocation(void* ArgsRV) {
+#ifdef ENABLE_JEMALLOC
struct ArgsRV_t {
void* ptr;
bool rv;
} *args = reinterpret_cast<ArgsRV_t*>(ArgsRV);
args->rv = je_is_known_allocation(args->ptr);
+#endif
}
static void LoadLib(void *ArgsV) {