From b6a395b5ecc60a92603b3154fd4c2cd8388cab5d Mon Sep 17 00:00:00 2001 From: daanx Date: Tue, 4 Apr 2023 19:18:47 -0700 Subject: [PATCH] reset stats more early for mstress --- test/test-stress.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/test-stress.c b/test/test-stress.c index f253000f..c6236b77 100644 --- a/test/test-stress.c +++ b/test/test-stress.c @@ -219,6 +219,10 @@ static void test_leak(void) { #endif int main(int argc, char** argv) { + #ifndef USE_STD_MALLOC + mi_stats_reset(); + #endif + // > mimalloc-test-stress [THREADS] [SCALE] [ITER] if (argc >= 2) { char* end; @@ -241,9 +245,6 @@ int main(int argc, char** argv) { //printf("(reserve huge: %i\n)", res); //bench_start_program(); -#ifndef USE_STD_MALLOC - mi_stats_reset(); -#endif // Run ITER full iterations where half the objects in the transfer buffer survive to the next round. srand(0x7feb352d);