mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 17:13:35 +03:00
HPA: add size-exclusion functionality.
I.e. only allowing allocations under or over certain sizes.
This commit is contained in:
parent
484f04733e
commit
534504d4a7
11 changed files with 84 additions and 16 deletions
4
src/pa.c
4
src/pa.c
|
|
@ -49,7 +49,7 @@ pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, emap_t *emap, base_t *base,
|
|||
|
||||
bool
|
||||
pa_shard_enable_hpa(pa_shard_t *shard, hpa_t *hpa, size_t ps_goal,
|
||||
size_t ps_alloc_max) {
|
||||
size_t ps_alloc_max, size_t small_max, size_t large_min) {
|
||||
ps_goal &= ~PAGE_MASK;
|
||||
ps_alloc_max &= ~PAGE_MASK;
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ pa_shard_enable_hpa(pa_shard_t *shard, hpa_t *hpa, size_t ps_goal,
|
|||
ps_alloc_max = ps_goal;
|
||||
}
|
||||
if (hpa_shard_init(&shard->hpa_shard, hpa, &shard->edata_cache,
|
||||
shard->ind, ps_goal, ps_alloc_max)) {
|
||||
shard->ind, ps_goal, ps_alloc_max, small_max, large_min)) {
|
||||
return true;
|
||||
}
|
||||
shard->ever_used_hpa = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue