mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-17 01:15:39 +03:00
Refactor the tcache initiailization
1. Pre-generate all default tcache ncached_max in tcache_boot; 2. Add getters returning default ncached_max and ncached_max_set; 3. Refactor tcache init so that it is always init with a given setting.
This commit is contained in:
parent
8a22d10b83
commit
6fb3b6a8e4
7 changed files with 75 additions and 61 deletions
|
|
@ -1323,14 +1323,12 @@ malloc_conf_init_helper(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS],
|
|||
CONF_CONTINUE;
|
||||
}
|
||||
if (CONF_MATCH("tcache_ncached_max")) {
|
||||
bool err = tcache_bin_info_settings_parse(
|
||||
v, vlen, opt_tcache_ncached_max,
|
||||
opt_tcache_ncached_max_set);
|
||||
bool err = tcache_bin_info_default_init(
|
||||
v, vlen);
|
||||
if (err) {
|
||||
CONF_ERROR("Invalid settings for "
|
||||
"tcache_ncached_max", k, klen, v,
|
||||
vlen);
|
||||
break;
|
||||
}
|
||||
CONF_CONTINUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue