about summary refs log tree commit diff stats
path: root/src/include
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2023-06-30 15:24:08 +0200
committerptitSeb <sebastien.chev@gmail.com>2023-06-30 15:24:08 +0200
commit509157a8b04ddec0f20e39136877bd13ce83e4e4 (patch)
tree658dce36a92b101b25ebaa8e992cef0316cf1844 /src/include
parentaa8b8184b33a8f3dee42fe59ce2cfeacf269a534 (diff)
downloadbox64-509157a8b04ddec0f20e39136877bd13ce83e4e4.tar.gz
box64-509157a8b04ddec0f20e39136877bd13ce83e4e4.zip
Go back to using regular malloc/free for Dynarec temporary allocation when building a block
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/dynarec_native.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/dynarec_native.h b/src/include/dynarec_native.h
index 891485a9..a956f1cc 100755
--- a/src/include/dynarec_native.h
+++ b/src/include/dynarec_native.h
@@ -5,6 +5,19 @@ typedef struct dynablock_s dynablock_t;
 typedef struct x64emu_s x64emu_t;
 typedef struct instsize_s instsize_t;
 
+//#define USE_CUSTOM_MEM
+#ifdef USE_CUSTOM_MEM
+#define dynaMalloc customMalloc
+#define dynaCalloc customCalloc
+#define dynaRealloc customRealloc
+#define dynaFree customFree
+#else
+#define dynaMalloc malloc
+#define dynaCalloc calloc
+#define dynaRealloc realloc
+#define dynaFree free
+#endif
+
 void addInst(instsize_t* insts, size_t* size, int x64_size, int native_size);
 
 void CancelBlock64(int need_lock);