summaryrefslogtreecommitdiffstats
path: root/src/jemalloc.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-09-17 17:17:55 (GMT)
committerJason Evans <jasone@canonware.com>2015-09-17 17:17:55 (GMT)
commit4be9c79f881066f4d3424d45d7845c03e1032d3c (patch)
treeda0082a1648bc2d8e5fee1a7d93d3a806303867f /src/jemalloc.c
parent38e2c8fa9c4a2a0613609b8b88a355670a2f9770 (diff)
downloadjemalloc-4be9c79f881066f4d3424d45d7845c03e1032d3c.zip
jemalloc-4be9c79f881066f4d3424d45d7845c03e1032d3c.tar.gz
jemalloc-4be9c79f881066f4d3424d45d7845c03e1032d3c.tar.bz2
Fix irallocx_prof_sample().
Fix irallocx_prof_sample() to always allocate large regions, even when alignment is non-zero.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r--src/jemalloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c
index ad904eb..b58252f 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -2098,8 +2098,8 @@ label_oom:
}
static void *
-irallocx_prof_sample(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t size,
- size_t alignment, size_t usize, bool zero, tcache_t *tcache, arena_t *arena,
+irallocx_prof_sample(tsd_t *tsd, void *old_ptr, size_t old_usize,
+ size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena,
prof_tctx_t *tctx)
{
void *p;
@@ -2113,7 +2113,7 @@ irallocx_prof_sample(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t size,
return (NULL);
arena_prof_promoted(p, usize);
} else {
- p = iralloct(tsd, old_ptr, old_usize, size, alignment, zero,
+ p = iralloct(tsd, old_ptr, old_usize, usize, alignment, zero,
tcache, arena);
}
@@ -2133,8 +2133,8 @@ irallocx_prof(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t size,
old_tctx = prof_tctx_get(old_ptr);
tctx = prof_alloc_prep(tsd, *usize, prof_active, true);
if (unlikely((uintptr_t)tctx != (uintptr_t)1U)) {
- p = irallocx_prof_sample(tsd, old_ptr, old_usize, size,
- alignment, *usize, zero, tcache, arena, tctx);
+ p = irallocx_prof_sample(tsd, old_ptr, old_usize, *usize,
+ alignment, zero, tcache, arena, tctx);
} else {
p = iralloct(tsd, old_ptr, old_usize, size, alignment, zero,
tcache, arena);