diff options
author | Jason Evans <jasone@canonware.com> | 2015-09-15 05:40:42 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2015-09-15 05:47:18 (GMT) |
commit | 46ff0491280635e51c9771d56a2d64dc0c4d6bd2 (patch) | |
tree | 93fc15c6a429655bed5a2f74e055da61ed833c0a /src/jemalloc.c | |
parent | 4acb6c7ff3411ddc4d180b0cbdba4fd2c3651ef0 (diff) | |
download | jemalloc-46ff0491280635e51c9771d56a2d64dc0c4d6bd2.zip jemalloc-46ff0491280635e51c9771d56a2d64dc0c4d6bd2.tar.gz jemalloc-46ff0491280635e51c9771d56a2d64dc0c4d6bd2.tar.bz2 |
Optimize irallocx_prof() to optimistically update the sampler state.
Diffstat (limited to 'src/jemalloc.c')
-rw-r--r-- | src/jemalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c index 6ed3d4e..74fab0f 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -2124,7 +2124,7 @@ irallocx_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size, prof_tctx_t *old_tctx, *tctx; old_tctx = prof_tctx_get(oldptr); - tctx = prof_alloc_prep(tsd, *usize, false); + tctx = prof_alloc_prep(tsd, *usize, true); if (unlikely((uintptr_t)tctx != (uintptr_t)1U)) { p = irallocx_prof_sample(tsd, oldptr, old_usize, size, alignment, *usize, zero, tcache, arena, tctx); @@ -2133,7 +2133,7 @@ irallocx_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size, tcache, arena); } if (unlikely(p == NULL)) { - prof_alloc_rollback(tsd, tctx, false); + prof_alloc_rollback(tsd, tctx, true); return (NULL); } @@ -2148,7 +2148,7 @@ irallocx_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size, */ *usize = isalloc(p, config_prof); } - prof_realloc(tsd, p, *usize, tctx, false, old_usize, old_tctx); + prof_realloc(tsd, p, *usize, tctx, true, old_usize, old_tctx); return (p); } |