From b14fdaaca0f3a8affac1bef468c3e446c56abbe2 Mon Sep 17 00:00:00 2001 From: Jason Evans Date: Wed, 1 Jun 2016 16:17:31 -0700 Subject: 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. --- include/jemalloc/internal/prof.h | 1 + 1 file changed, 1 insertion(+) 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; } } -- cgit v0.12