diff options
| author | Yang Liu <liuyang22@iscas.ac.cn> | 2025-01-21 23:13:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-21 16:13:51 +0100 |
| commit | 044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5 (patch) | |
| tree | dc41c611965cec299dcb62185c5fba4935b6251f /src/box64context.c | |
| parent | ed8b6fe9db863a8d9e473a645e84700c7291bb06 (diff) | |
| download | box64-044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5.tar.gz box64-044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5.zip | |
[ENV] Initial refactor of env variables infrastructure (#2274)
* [ENV] Initial refactor of env variables infrastructure * Ported BOX64_DYNAREC_LOG * Ported more options * Ported BOX64_MALLOC_HACK * Ported BOX64_DYNAREC_TEST * Ported more options * Ported more options * Ported more options * Ported all options * Removed old rcfile parser * Fix * review * fix * fix * more fixes
Diffstat (limited to 'src/box64context.c')
| -rw-r--r-- | src/box64context.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/box64context.c b/src/box64context.c index 94df1142..7cb2916c 100644 --- a/src/box64context.c +++ b/src/box64context.c @@ -19,7 +19,6 @@ #include "wrapper.h" #include "x64emu.h" #include "signals.h" -#include "rcfile.h" #include "gltools.h" #include "rbtree.h" #include "dynarec.h" @@ -49,7 +48,6 @@ void finiAllHelpers(box64context_t* context) static int finied = 0; if(finied) return; - DeleteParams(); fini_pthread_helper(context); fini_signal_helper(); fini_bridge_helper(); @@ -181,8 +179,8 @@ static void atfork_child_box64context(void) void freeCycleLog(box64context_t* ctx) { - if(cycle_log) { - for(int i=0; i<cycle_log; ++i) { + if(BOX64ENV(rolling_log)) { + for(int i=0; i<BOX64ENV(rolling_log); ++i) { box_free(ctx->log_call[i]); box_free(ctx->log_ret[i]); } @@ -194,10 +192,10 @@ void freeCycleLog(box64context_t* ctx) } void initCycleLog(box64context_t* context) { - if(cycle_log) { - context->log_call = (char**)box_calloc(cycle_log, sizeof(char*)); - context->log_ret = (char**)box_calloc(cycle_log, sizeof(char*)); - for(int i=0; i<cycle_log; ++i) { + if(BOX64ENV(rolling_log)) { + context->log_call = (char**)box_calloc(BOX64ENV(rolling_log), sizeof(char*)); + context->log_ret = (char**)box_calloc(BOX64ENV(rolling_log), sizeof(char*)); + for(int i=0; i<BOX64ENV(rolling_log); ++i) { context->log_call[i] = (char*)box_calloc(256, 1); context->log_ret[i] = (char*)box_calloc(128, 1); } |