fix bug where only the first chunkmap field would be considered

This commit is contained in:
daanx 2024-12-08 18:48:56 -08:00
parent 88990cec2d
commit bf2f2a8bf4
3 changed files with 3 additions and 3 deletions

View file

@ -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 */ \ /* start chunk index -- todo: can depend on the tseq to decrease contention between threads */ \
MI_UNUSED(tseq); \ MI_UNUSED(tseq); \
const size_t chunk_start = 0; /* (tseq % (1+chunk_hi_idx)); */ /* space out threads? */ \ 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_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 = chunk_start / MI_BFIELD_BITS; \
const size_t chunkmap_start_idx = chunk_start % MI_BFIELD_BITS; \ const size_t chunkmap_start_idx = chunk_start % MI_BFIELD_BITS; \

View file

@ -68,7 +68,7 @@ typedef struct mi_option_desc_s {
// in KiB // in KiB
#ifndef MI_DEFAULT_ARENA_RESERVE #ifndef MI_DEFAULT_ARENA_RESERVE
#if (MI_INTPTR_SIZE>4) #if (MI_INTPTR_SIZE>4)
#define MI_DEFAULT_ARENA_RESERVE 1024L*1024L #define MI_DEFAULT_ARENA_RESERVE 8*1024L*1024L
#else #else
#define MI_DEFAULT_ARENA_RESERVE 128L*1024L #define MI_DEFAULT_ARENA_RESERVE 128L*1024L
#endif #endif

View file

@ -57,7 +57,7 @@ static int ITER = 10;
#define ALLOW_LARGE true #define ALLOW_LARGE true
#else #else
static int THREADS = 32; // more repeatable if THREADS <= #processors 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 static int ITER = 50; // N full iterations destructing and re-creating all threads
#endif #endif