mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-28 19:33:04 +03:00
parent
6cc6a4ce51
commit
8ce81ac2f7
6 changed files with 54 additions and 3 deletions
|
|
@ -433,11 +433,18 @@ hpa_purge_actual_unlocked(
|
|||
hpa_range_accum_init(&accum, vec, len);
|
||||
|
||||
for (size_t i = 0; i < batch_sz; ++i) {
|
||||
hpdata_t *to_purge = batch[i].hp;
|
||||
|
||||
/* Actually do the purging, now that the lock is dropped. */
|
||||
if (batch[i].dehugify) {
|
||||
shard->central->hooks.dehugify(
|
||||
hpdata_addr_get(to_purge), HUGEPAGE);
|
||||
}
|
||||
void *purge_addr;
|
||||
size_t purge_size;
|
||||
size_t total_purged_on_one_hp = 0;
|
||||
while (hpdata_purge_next(
|
||||
batch[i].hp, &batch[i].state, &purge_addr, &purge_size)) {
|
||||
to_purge, &batch[i].state, &purge_addr, &purge_size)) {
|
||||
total_purged_on_one_hp += purge_size;
|
||||
assert(total_purged_on_one_hp <= HUGEPAGE);
|
||||
hpa_range_accum_add(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue