@@ -35,6 +35,10 @@ static void multithreaded(benchmark::internal::Benchmark *benchmark) {
3535 benchmark->Threads (1 );
3636}
3737
38+ static void singlethreaded (benchmark::internal::Benchmark *benchmark) {
39+ benchmark->Threads (1 );
40+ }
41+
3842static void
3943default_multiple_alloc_fix_size (benchmark::internal::Benchmark *benchmark) {
4044 benchmark->Args ({10000 , 1 , 4096 });
@@ -68,15 +72,17 @@ UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark, proxy_pool,
6872UMF_BENCHMARK_REGISTER_F (multiple_malloc_free_benchmark, proxy_pool)
6973 ->Apply(&default_multiple_alloc_fix_size)
7074 // reduce iterations, as this benchmark is slower than others
71- ->Iterations(50000 );
75+ ->Iterations(50000 )
76+ ->Apply(&singlethreaded);
7277
7378UMF_BENCHMARK_TEMPLATE_DEFINE (multiple_malloc_free_benchmark, os_provider,
7479 fixed_alloc_size,
7580 provider_allocator<os_provider>);
7681UMF_BENCHMARK_REGISTER_F (multiple_malloc_free_benchmark, os_provider)
7782 ->Apply(&default_multiple_alloc_fix_size)
7883 // reduce iterations, as this benchmark is slower than others
79- ->Iterations(50000 );
84+ ->Iterations(50000 )
85+ ->Apply(&singlethreaded);
8086
8187UMF_BENCHMARK_TEMPLATE_DEFINE (multiple_malloc_free_benchmark, disjoint_pool_fix,
8288 fixed_alloc_size,
@@ -89,8 +95,9 @@ UMF_BENCHMARK_TEMPLATE_DEFINE(multiple_malloc_free_benchmark,
8995 disjoint_pool_uniform, uniform_alloc_size,
9096 pool_allocator<disjoint_pool<os_provider>>);
9197UMF_BENCHMARK_REGISTER_F (multiple_malloc_free_benchmark, disjoint_pool_uniform)
92- ->Apply(&default_multiple_alloc_uniform_size);
93- // TODO: enable
98+ ->Apply(&default_multiple_alloc_uniform_size)
99+ ->Apply(&singlethreaded);
100+ // TODO: change to multithreaded
94101// ->Apply(&multithreaded);
95102
96103#ifdef UMF_POOL_JEMALLOC_ENABLED
0 commit comments