aboutsummaryrefslogtreecommitdiff
path: root/src/arena.c
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2015-03-25 18:56:55 -0700
committerJason Evans <je@fb.com>2015-03-25 19:10:06 -0700
commit65db63cf3f0c5dd5126a1b3786756486eaf931ba (patch)
tree10f598324c157723127e2cd90850a7e787f2f854 /src/arena.c
parent562d266511053a51406e91c78eba640cb46ad9c8 (diff)
downloadjemalloc-65db63cf3f0c5dd5126a1b3786756486eaf931ba.tar.gz
Fix in-place shrinking huge reallocation purging bugs.
Fix the shrinking case of huge_ralloc_no_move_similar() to purge the correct number of pages, at the correct offset. This regression was introduced by 8d6a3e8321a7767cb2ca0930b85d5d488a8cc659 (Implement dynamic per arena control over dirty page purging.). Fix huge_ralloc_no_move_shrink() to purge the correct number of pages. This bug was introduced by 9673983443a0782d975fbcb5d8457cfd411b8b56 (Purge/zero sub-chunk huge allocations as necessary.).
Diffstat (limited to 'src/arena.c')
-rw-r--r--src/arena.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/arena.c b/src/arena.c
index bc13d20..3041068 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -1245,16 +1245,11 @@ arena_purge_stashed(arena_t *arena,
if (rdelm == &chunkselm->rd) {
size_t size = extent_node_size_get(chunkselm);
- void *addr, *chunk;
- size_t offset;
bool unzeroed;
npages = size >> LG_PAGE;
- addr = extent_node_addr_get(chunkselm);
- chunk = CHUNK_ADDR2BASE(addr);
- offset = CHUNK_ADDR2OFFSET(addr);
unzeroed = chunk_purge_wrapper(arena, chunk_purge,
- chunk, offset, size);
+ extent_node_addr_get(chunkselm), 0, size);
extent_node_zeroed_set(chunkselm, !unzeroed);
chunkselm = qr_next(chunkselm, cc_link);
} else {