From 51aa4b0416fbd9e960b5699dde5f573d89b54ae4 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 30 Nov 2024 14:02:28 +0100 Subject: Added a new memExist helper function and use it instead of getMmapped were it make sense --- src/custommem.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/custommem.c') 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 -- cgit 1.4.1