summaryrefslogtreecommitdiffstats
path: root/src/arena.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-10-03 21:18:55 (GMT)
committerJason Evans <jasone@canonware.com>2016-10-03 21:18:55 (GMT)
commit871a9498e13572f99451ed88db36cda6c9fecf8f (patch)
tree514e2c0b70626c36da003c2738927a07454de87d /src/arena.c
parentd51139c33c180a59dcee0c3880b8261f075139b3 (diff)
downloadjemalloc-871a9498e13572f99451ed88db36cda6c9fecf8f.zip
jemalloc-871a9498e13572f99451ed88db36cda6c9fecf8f.tar.gz
jemalloc-871a9498e13572f99451ed88db36cda6c9fecf8f.tar.bz2
Fix size class overflow bugs.
Avoid calling s2u() on raw extent sizes in extent_recycle(). Clamp psz2ind() (implemented as psz2ind_clamp()) when inserting/removing into/from size-segregated extent heaps.
Diffstat (limited to 'src/arena.c')
-rw-r--r--src/arena.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arena.c b/src/arena.c
index 42cd3b0..2e23c0b 100644
--- a/src/arena.c
+++ b/src/arena.c
@@ -769,8 +769,8 @@ arena_stash_dirty(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks,
/* Allocate. */
zero = false;
textent = extent_alloc_cache_locked(tsdn, arena, r_extent_hooks,
- extent_base_get(extent), extent_size_get(extent), 0,
- CACHELINE, &zero, false);
+ extent_base_get(extent), extent_size_get(extent), 0, PAGE,
+ &zero, false);
assert(textent == extent);
assert(zero == extent_zeroed_get(extent));
extent_ring_remove(extent);