diff options
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 6df6c8b1..4c0af6cd 100755 --- a/src/main.c +++ b/src/main.c @@ -45,6 +45,7 @@ int box64_dynarec_log = LOG_NONE; uintptr_t box64_pagesize; uintptr_t box64_load_addr = 0; int box64_nosandbox = 0; +int box64_malloc_hack = 0; #ifdef DYNAREC int box64_dynarec = 1; int box64_dynarec_dump = 0; @@ -678,6 +679,19 @@ void LoadLogEnv() if(!box64_dummy_crashhandler) printf_log(LOG_INFO, "Don't use dummy crashhandler lib\n"); } + p = getenv("BOX64_MALLOC_HACK"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='0'+2) + box64_malloc_hack = p[0]-'0'; + } + if(!box64_malloc_hack) { + if(box64_malloc_hack==1) { + printf_log(LOG_INFO, "Malloc hook will not be redirected\n"); + } else + printf_log(LOG_INFO, "Malloc hook will check for mmap/free occurences\n"); + } + } p = getenv("BOX64_NOPULSE"); if(p) { if(strlen(p)==1) { |