mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-28 11:23:08 +03:00
Introduce hpdata_t.
Using an edata_t both for hugepages and the allocations within those hugepages was convenient at first, but has outlived its usefulness. Representing hugepages explicitly, with their own data structure, will make future development easier.
This commit is contained in:
parent
4a15008cfb
commit
ca30b5db2b
17 changed files with 414 additions and 405 deletions
4
src/pa.c
4
src/pa.c
|
|
@ -51,8 +51,8 @@ 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, size_t alloc_max, size_t sec_nshards,
|
||||
size_t sec_alloc_max, size_t sec_bytes_max) {
|
||||
if (hpa_shard_init(&shard->hpa_shard, shard->emap, &shard->edata_cache,
|
||||
shard->ind, alloc_max)) {
|
||||
if (hpa_shard_init(&shard->hpa_shard, shard->emap, shard->base,
|
||||
&shard->edata_cache, shard->ind, alloc_max)) {
|
||||
return true;
|
||||
}
|
||||
if (sec_init(&shard->hpa_sec, &shard->hpa_shard.pai, sec_nshards,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue