diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-12-21 15:48:42 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-12-21 15:48:42 +0100 |
| commit | 7d0f8078807c9a0d5f4416566da343de419015bf (patch) | |
| tree | 8d55cf47460d6a98841295867d597a8d34b6042d /src | |
| parent | b66eccedc0d08a6d545fe9c443119fb436c8b888 (diff) | |
| download | box64-7d0f8078807c9a0d5f4416566da343de419015bf.tar.gz box64-7d0f8078807c9a0d5f4416566da343de419015bf.zip | |
Allocated more cleanup when needed to avoid frequent resize
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64emu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c index 8ac3e179..2d747c92 100644 --- a/src/emu/x64emu.c +++ b/src/emu/x64emu.c @@ -142,7 +142,7 @@ void AddCleanup(x64emu_t *emu, void *p, void* dso_handle) (void)emu; if(my_context->clean_sz == my_context->clean_cap) { - my_context->clean_cap += 4; + my_context->clean_cap += 32; my_context->cleanups = (cleanup_t*)box_realloc(my_context->cleanups, sizeof(cleanup_t)*my_context->clean_cap); } my_context->cleanups[my_context->clean_sz].arg = 0; @@ -156,7 +156,7 @@ void AddCleanup1Arg(x64emu_t *emu, void *p, void* a, void* dso_handle) (void)emu; if(my_context->clean_sz == my_context->clean_cap) { - my_context->clean_cap += 4; + my_context->clean_cap += 32; my_context->cleanups = (cleanup_t*)box_realloc(my_context->cleanups, sizeof(cleanup_t)*my_context->clean_cap); } my_context->cleanups[my_context->clean_sz].arg = 1; |