From bf2f2a8bf42397dc1fba1a9e353628013740661a Mon Sep 17 00:00:00 2001 From: daanx Date: Sun, 8 Dec 2024 18:48:56 -0800 Subject: [PATCH] fix bug where only the first chunkmap field would be considered --- src/bitmap.c | 2 +- src/options.c | 2 +- test/test-stress.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bitmap.c b/src/bitmap.c index 44113429..45a82ba3 100644 --- a/src/bitmap.c +++ b/src/bitmap.c @@ -1028,7 +1028,7 @@ bool mi_bitmap_is_xsetN(mi_xset_t set, mi_bitmap_t* bitmap, size_t idx, size_t n /* start chunk index -- todo: can depend on the tseq to decrease contention between threads */ \ MI_UNUSED(tseq); \ const size_t chunk_start = 0; /* (tseq % (1+chunk_hi_idx)); */ /* space out threads? */ \ - const size_t chunkmap_max_bfield = _mi_divide_up( mi_bitmap_chunk_count(bitmap), MI_BCHUNK_BITS ); \ + const size_t chunkmap_max_bfield = _mi_divide_up( mi_bitmap_chunk_count(bitmap), MI_BFIELD_BITS ); \ const size_t chunkmap_hi_bfield = chunkmap_max_bfield; /* chunk_hi_idx / MI_BFIELD_BITS; */\ const size_t chunkmap_start = chunk_start / MI_BFIELD_BITS; \ const size_t chunkmap_start_idx = chunk_start % MI_BFIELD_BITS; \ diff --git a/src/options.c b/src/options.c index f2e9297f..e47f1b6e 100644 --- a/src/options.c +++ b/src/options.c @@ -68,7 +68,7 @@ typedef struct mi_option_desc_s { // in KiB #ifndef MI_DEFAULT_ARENA_RESERVE #if (MI_INTPTR_SIZE>4) - #define MI_DEFAULT_ARENA_RESERVE 1024L*1024L + #define MI_DEFAULT_ARENA_RESERVE 8*1024L*1024L #else #define MI_DEFAULT_ARENA_RESERVE 128L*1024L #endif diff --git a/test/test-stress.c b/test/test-stress.c index 96cf702d..915c953f 100644 --- a/test/test-stress.c +++ b/test/test-stress.c @@ -57,7 +57,7 @@ static int ITER = 10; #define ALLOW_LARGE true #else static int THREADS = 32; // more repeatable if THREADS <= #processors -static int SCALE = 50; // scaling factor +static int SCALE = 25; // scaling factor static int ITER = 50; // N full iterations destructing and re-creating all threads #endif