about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--docs/USAGE.md8
-rw-r--r--src/custommem.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/docs/USAGE.md b/docs/USAGE.md
index 5778a231..e2b6075e 100644
--- a/docs/USAGE.md
+++ b/docs/USAGE.md
@@ -303,6 +303,10 @@ Define x86_64 bash to launch script
  * XXX=yyyy

  will add XXX=yyyy env. var. and continue with BOX86_ENV2 ... until var doesn't exist

 

+#### BOX64_RESERVE_HIGH

+* 0 : Don't try to pe-reserve high memory (beyond 47bits) (Default)

+* 1 : Try to reserve (without allocating it) memory beyond 47bits (seems unstable)

+

 #### BOX64_JITGDB *

  * 0 : Just print the Segfault message on segfault (default)

  * 1 : Launch `gdb` when a segfault, bus error or illegal instruction signal is trapped, attached to the offending process and go in an endless loop, waiting.

@@ -329,7 +333,3 @@ Those variables are only valid inside a rcfile:
 #### BOX64_EXIT

  * 0 : Nothing special

  * 1 : Just exit, don't try to run the program

-

-#### BOX64_RESERVE_HIGH

-* 0 : Don't try to pe-reserve high memory (beyond 47bits) (Default)

-* 1 : Try to reserve (without allocating it) memory beyond 47bits (seems unstable)

diff --git a/src/custommem.c b/src/custommem.c
index fb55ac2c..a5f4cf61 100644
--- a/src/custommem.c
+++ b/src/custommem.c
@@ -1631,7 +1631,11 @@ static void atfork_child_custommem(void)
 void reserveHighMem()
 {
     char* p = getenv("BOX64_RESERVE_HIGH");
+    #ifdef ADLINK
+    if(p && p[0]=='0')
+    #else
     if(!p || p[0]=='0')
+    #endif
         return; // don't reserve by default
     intptr_t cur = 1LL<<47;
     mapmem_t* m = mapmem;