about summary refs log tree commit diff stats
path: root/src/core.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-07-03 18:31:03 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-07-03 18:31:03 +0200
commitab9b88091cb175ce0d8ec242c04583b54e2db02c (patch)
tree8077484743d97f4df7542204246de86a91bb469c /src/core.c
parenta0fb28ac551a3f3d95828445a6fdea74ead78437 (diff)
downloadbox64-ab9b88091cb175ce0d8ec242c04583b54e2db02c.tar.gz
box64-ab9b88091cb175ce0d8ec242c04583b54e2db02c.zip
[BOX32] Simplified and improved 32bits memory management
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core.c b/src/core.c
index e8b14024..b8a85d0c 100644
--- a/src/core.c
+++ b/src/core.c
@@ -59,6 +59,7 @@ int box64_stdout_no_w = 0;
 uintptr_t box64_pagesize;
 path_collection_t box64_addlibs = {0};
 int box64_is32bits = 0;
+int box64_isAddressSpace32 = 0;
 int box64_rdtsc = 0;
 uint8_t box64_rdtsc_shift = 0;
 int box64_mapclean = 0;
@@ -1159,7 +1160,10 @@ int initialize(int argc, const char **argv, char** env, x64emu_t** emulator, elf
         if(tried) {
             unsetenv("BOX32_PERSONA32BITS");
             int p = personality(0xffffffff);
-            if(p==ADDR_LIMIT_32BIT) printf_log(LOG_INFO, "Personality set to 32bits\n");
+            if(p==ADDR_LIMIT_32BIT) {
+                box64_isAddressSpace32 = 1;
+                printf_log(LOG_INFO, "Personality set to 32bits\n");
+            }
         } else {
             if(personality(ADDR_LIMIT_32BIT)!=-1) {
                 int nenv = 0;