summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2016-06-01 23:17:31 (GMT)
committerJason Evans <jasone@canonware.com>2016-06-06 03:42:24 (GMT)
commitb14fdaaca0f3a8affac1bef468c3e446c56abbe2 (patch)
tree504417b362804acff68c492715a9c44a0b528cfb /include
parentc8c3cbdf47f97c2661395efc572b12ff2a7de05f (diff)
downloadjemalloc-b14fdaaca0f3a8affac1bef468c3e446c56abbe2.zip
jemalloc-b14fdaaca0f3a8affac1bef468c3e446c56abbe2.tar.gz
jemalloc-b14fdaaca0f3a8affac1bef468c3e446c56abbe2.tar.bz2
Add a missing prof_alloc_rollback() call.
In the case where prof_alloc_prep() is called with an over-estimate of allocation size, and sampling doesn't end up being triggered, the tctx must be discarded.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/prof.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/jemalloc/internal/prof.h b/include/jemalloc/internal/prof.h
index 8fdc27f..0fdee08 100644
--- a/include/jemalloc/internal/prof.h
+++ b/include/jemalloc/internal/prof.h
@@ -520,6 +520,7 @@ prof_realloc(tsd_t *tsd, extent_t *extent, const void *ptr, size_t usize,
* though its actual usize was insufficient to cross the
* sample threshold.
*/
+ prof_alloc_rollback(tsd, tctx, true);
tctx = (prof_tctx_t *)(uintptr_t)1U;
}
}