diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-01-23 10:01:11 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-01-23 10:01:11 +0100 |
| commit | 89da530898fa08c23b59e3e3bf64f266f113e014 (patch) | |
| tree | e38ddfff281f2d2144916be550b839081cbcd095 /src/box64context.c | |
| parent | 2367e7df504dadd495abe095bd167cce67afb713 (diff) | |
| download | box64-89da530898fa08c23b59e3e3bf64f266f113e014.tar.gz box64-89da530898fa08c23b59e3e3bf64f266f113e014.zip | |
[DYNAREC] use an rbtree for dynablock size and max_db_size update
Diffstat (limited to 'src/box64context.c')
| -rw-r--r-- | src/box64context.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/box64context.c b/src/box64context.c index b302b777..679ee108 100644 --- a/src/box64context.c +++ b/src/box64context.c @@ -21,6 +21,7 @@ #include "signals.h" #include "rcfile.h" #include "gltools.h" +#include "rbtree.h" EXPORTDYN void initAllHelpers(box64context_t* context) @@ -264,6 +265,10 @@ box64context_t *NewBox64Context(int argc) context->globdata = NewMapSymbols(); initAllHelpers(context); + + #ifdef DYNAREC + context->db_sizes = init_rbtree(); + #endif return context; } @@ -359,6 +364,11 @@ void FreeBox64Context(box64context_t** context) FreeMapSymbols(&ctx->globdata); +#ifdef DYNAREC + //dynarec_log(LOG_INFO, "BOX64 Dynarec at exit: Max DB=%d, righter=%d\n", ctx->max_db_size, rb_get_righter(ctx->db_sizes)); + delete_rbtree(ctx->db_sizes); +#endif + finiAllHelpers(ctx); #ifdef DYNAREC |