mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-06 19:38:41 +03:00
revise free reclaim; ensure unown cannot race with a free
This commit is contained in:
parent
833b091ff9
commit
666c089fc8
10 changed files with 281 additions and 79 deletions
|
@ -43,7 +43,13 @@ static int ITER = 10;
|
|||
#elif 0
|
||||
static int THREADS = 4;
|
||||
static int SCALE = 100;
|
||||
static int ITER = 10;
|
||||
#define ALLOW_LARGE false
|
||||
#elif 1
|
||||
static int THREADS = 32;
|
||||
static int SCALE = 50;
|
||||
static int ITER = 50;
|
||||
#define ALLOW_LARGE false
|
||||
#else
|
||||
static int THREADS = 32; // more repeatable if THREADS <= #processors
|
||||
static int SCALE = 50; // scaling factor
|
||||
|
@ -54,7 +60,12 @@ static int ITER = 50; // N full iterations destructing and re-creating a
|
|||
|
||||
#define STRESS // undefine for leak test
|
||||
|
||||
static bool allow_large_objects = false; // allow very large objects? (set to `true` if SCALE>100)
|
||||
#ifndef ALLOW_LARGE
|
||||
#define ALLOW_LARGE true
|
||||
#endif
|
||||
|
||||
static bool allow_large_objects = ALLOW_LARGE; // allow very large objects? (set to `true` if SCALE>100)
|
||||
|
||||
static size_t use_one_size = 0; // use single object size of `N * sizeof(uintptr_t)`?
|
||||
|
||||
static bool main_participates = false; // main thread participates as a worker too
|
||||
|
@ -332,6 +343,8 @@ int main(int argc, char** argv) {
|
|||
mi_debug_show_arenas(true,true,false);
|
||||
#endif
|
||||
// mi_stats_print(NULL);
|
||||
#else
|
||||
mi_stats_print(NULL); // so we see rss/commit/elapsed
|
||||
#endif
|
||||
//bench_end_program();
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue