about summary refs log tree commit diff stats
path: root/src/custommem.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-07-21 09:38:00 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-07-21 09:38:00 +0200
commitf39d3ea43e8a87386cc39b66ff2169fa72167094 (patch)
tree00e67ac485db2ba1279641f8994ad5ec065bd56c /src/custommem.c
parent7ad169c7a80f6df5021ad977fd4c8f441abe2728 (diff)
downloadbox64-f39d3ea43e8a87386cc39b66ff2169fa72167094.tar.gz
box64-f39d3ea43e8a87386cc39b66ff2169fa72167094.zip
Leave low memory for wine if it's loaded
Diffstat (limited to 'src/custommem.c')
-rw-r--r--src/custommem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/custommem.c b/src/custommem.c
index 84265816..da11885f 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -1367,13 +1367,14 @@ int getMmapped(uintptr_t addr)
 }
 
 #define LOWEST (void*)0x10000
+#define WINE_LOWEST (void*)0x30000000
 #define MEDIUM (void*)0x40000000
 #define HIGH   (void*)0x60000000
 
 void* find31bitBlockNearHint(void* hint, size_t size, uintptr_t mask)
 {
     uint32_t prot;
-    if(hint<LOWEST) hint = LOWEST;
+    if(hint<LOWEST) hint = box64_wine?WINE_LOWEST:LOWEST;
     uintptr_t bend = 0;
     uintptr_t cur = (uintptr_t)hint;
     if(!mask) mask = 0xffff;