about summary refs log tree commit diff stats
path: root/src/custommem.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-11-30 14:02:28 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-11-30 14:02:28 +0100
commit51aa4b0416fbd9e960b5699dde5f573d89b54ae4 (patch)
treeceabba3bcf4e3a9ffe080fa8063563bd30016cf9 /src/custommem.c
parentb0db168fb57dd63e101c99b8c728aff9039a23bc (diff)
downloadbox64-51aa4b0416fbd9e960b5699dde5f573d89b54ae4.tar.gz
box64-51aa4b0416fbd9e960b5699dde5f573d89b54ae4.zip
Added a new memExist helper function and use it instead of getMmapped were it make sense
Diffstat (limited to 'src/custommem.c')
-rw-r--r--src/custommem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/custommem.c b/src/custommem.c
index dc7280e9..b6af88cc 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -904,6 +904,7 @@ uintptr_t AllocDynarecMap(size_t size)
             dynarec_allocated += allocsize;
 #endif
             setProtection((uintptr_t)p, allocsize, PROT_READ | PROT_WRITE | PROT_EXEC);
+
             list->chunks[i].block = p;
             list->chunks[i].first = p;
             list->chunks[i].size = allocsize;
@@ -1666,6 +1667,11 @@ int getMmapped(uintptr_t addr)
     return rb_get(mmapmem, addr);
 }
 
+int memExist(uintptr_t addr)
+{
+    return rb_get(mapallmem, addr);
+}
+
 #define LOWEST (void*)0x10000
 #define WINE_LOWEST (void*)0x30000000
 #define MEDIUM (void*)0x40000000