From 044dec0bfa0f3f8f62f7703d6b0a8600c1354dc5 Mon Sep 17 00:00:00 2001 From: Yang Liu Date: Tue, 21 Jan 2025 23:13:51 +0800 Subject: [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 --- src/box64context.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/box64context.c') 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; ilog_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; ilog_call = (char**)box_calloc(BOX64ENV(rolling_log), sizeof(char*)); + context->log_ret = (char**)box_calloc(BOX64ENV(rolling_log), sizeof(char*)); + for(int i=0; ilog_call[i] = (char*)box_calloc(256, 1); context->log_ret[i] = (char*)box_calloc(128, 1); } -- cgit 1.4.1