diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-11-30 14:02:28 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-11-30 14:02:28 +0100 |
| commit | 51aa4b0416fbd9e960b5699dde5f573d89b54ae4 (patch) | |
| tree | ceabba3bcf4e3a9ffe080fa8063563bd30016cf9 /src/custommem.c | |
| parent | b0db168fb57dd63e101c99b8c728aff9039a23bc (diff) | |
| download | box64-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.c | 6 |
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 |