Skip to content

Commit 3dc3f45

Browse files
committed
wip review
1 parent e9d89b6 commit 3dc3f45

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pool/pool_jemalloc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ static umf_result_t op_initialize(umf_memory_provider_handle_t provider,
431431

432432
extent_hooks_t *pHooks = &arena_extent_hooks;
433433
size_t unsigned_size = sizeof(unsigned);
434+
size_t n_arenas = 0;
435+
int n_arenas_set_from_params = 0;
434436
int err;
435437
const umf_jemalloc_pool_params_t *jemalloc_params;
436438

@@ -441,9 +443,9 @@ static umf_result_t op_initialize(umf_memory_provider_handle_t provider,
441443
jemalloc_params = &default_params;
442444
} else {
443445
jemalloc_params = params;
446+
n_arenas = jemalloc_params->n_arenas;
447+
n_arenas_set_from_params = 1;
444448
}
445-
size_t n_arenas = jemalloc_params->n_arenas;
446-
int n_arenas_set_from_params = (params != NULL);
447449

448450
if (n_arenas == 0) {
449451
n_arenas = utils_get_num_cores() * 4;

0 commit comments

Comments
 (0)