diff options
author | Jason Evans <jasone@canonware.com> | 2016-06-01 16:17:31 -0700 |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2016-06-08 10:12:38 -0700 |
commit | 20cd2de5ef622c3af8b3e4aba897aff7ddd451a7 (patch) | |
tree | 3695ba215ade18699b5d7ba4bb46bf02530ee73f | |
parent | a7fdcc8b09d197d64d1772d1e8025add44f48f0a (diff) | |
download | jemalloc-20cd2de5ef622c3af8b3e4aba897aff7ddd451a7.tar.gz |
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.
-rw-r--r-- | include/jemalloc/internal/prof.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/jemalloc/internal/prof.h b/include/jemalloc/internal/prof.h index 691e153..21dff5f 100644 --- a/include/jemalloc/internal/prof.h +++ b/include/jemalloc/internal/prof.h @@ -513,6 +513,7 @@ prof_realloc(tsd_t *tsd, const void *ptr, size_t usize, prof_tctx_t *tctx, * though its actual usize was insufficient to cross the * sample threshold. */ + prof_alloc_rollback(tsd, tctx, true); tctx = (prof_tctx_t *)(uintptr_t)1U; } } |