mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
HPA: Make dehugification threshold configurable.
This commit is contained in:
committed by
David Goldblatt
parent
4790db15ed
commit
32dd153796
@@ -1437,6 +1437,27 @@ malloc_conf_init_helper(sc_data_t *sc_data, unsigned bin_shard_sizes[SC_NBINS],
|
||||
CONF_CONTINUE;
|
||||
}
|
||||
|
||||
/* And the same for the dehugification_threhsold. */
|
||||
CONF_HANDLE_SIZE_T(
|
||||
opt_hpa_opts.dehugification_threshold,
|
||||
"hpa_dehugification_threshold", PAGE, HUGEPAGE,
|
||||
CONF_CHECK_MIN, CONF_CHECK_MAX, true);
|
||||
if (CONF_MATCH("hpa_dehugification_threshold_ratio")) {
|
||||
fxp_t ratio;
|
||||
char *end;
|
||||
bool err = fxp_parse(&ratio, v,
|
||||
&end);
|
||||
if (err || (size_t)(end - v) != vlen
|
||||
|| ratio > FXP_INIT_INT(1)) {
|
||||
CONF_ERROR("Invalid conf value",
|
||||
k, klen, v, vlen);
|
||||
} else {
|
||||
opt_hpa_opts.dehugification_threshold =
|
||||
fxp_mul_frac(HUGEPAGE, ratio);
|
||||
}
|
||||
CONF_CONTINUE;
|
||||
}
|
||||
|
||||
CONF_HANDLE_SIZE_T(opt_hpa_sec_max_alloc, "hpa_sec_max_alloc",
|
||||
PAGE, 0, CONF_CHECK_MIN, CONF_DONT_CHECK_MAX, true);
|
||||
CONF_HANDLE_SIZE_T(opt_hpa_sec_max_bytes, "hpa_sec_max_bytes",
|
||||
|
||||
Reference in New Issue
Block a user