mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-04 11:14:20 +03:00
HPA: Introduce a redesigned hpa_central_t.
For now, this only handles allocating virtual address space to shards, with no reuse. This is framework, though; it will change over time.
This commit is contained in:
parent
e09eac1d4e
commit
d93eef2f40
10 changed files with 257 additions and 128 deletions
|
|
@ -1747,7 +1747,19 @@ malloc_init_hard_a0_locked() {
|
|||
if (config_prof) {
|
||||
prof_boot1();
|
||||
}
|
||||
arena_boot(&sc_data);
|
||||
if (opt_hpa && !hpa_supported()) {
|
||||
malloc_printf("<jemalloc>: HPA not supported in the current "
|
||||
"configuration; %s.",
|
||||
opt_abort_conf ? "aborting" : "disabling");
|
||||
if (opt_abort_conf) {
|
||||
malloc_abort_invalid_conf();
|
||||
} else {
|
||||
opt_hpa = false;
|
||||
}
|
||||
}
|
||||
if (arena_boot(&sc_data, b0get(), opt_hpa)) {
|
||||
return true;
|
||||
}
|
||||
if (tcache_boot(TSDN_NULL, b0get())) {
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1786,7 +1798,7 @@ malloc_init_hard_a0_locked() {
|
|||
hpa_shard_opts_t hpa_shard_opts = opt_hpa_opts;
|
||||
hpa_shard_opts.deferral_allowed = background_thread_enabled();
|
||||
if (pa_shard_enable_hpa(TSDN_NULL, &a0->pa_shard,
|
||||
&hpa_hooks_default, &hpa_shard_opts, &opt_hpa_sec_opts)) {
|
||||
&hpa_shard_opts, &opt_hpa_sec_opts)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue