summaryrefslogtreecommitdiffstats
path: root/src/huge.c
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2015-09-15 06:48:11 (GMT)
committerJason Evans <jasone@canonware.com>2015-09-15 06:57:58 (GMT)
commit708ed79834fc3b8e5b14dbb0128a0ebfce63a38f (patch)
tree125a1ff759f552600861a18f2454909fd9ff7bbc /src/huge.c
parentea8d97b8978a0c0423f0ed64332463a25b787c3d (diff)
downloadjemalloc-708ed79834fc3b8e5b14dbb0128a0ebfce63a38f.zip
jemalloc-708ed79834fc3b8e5b14dbb0128a0ebfce63a38f.tar.gz
jemalloc-708ed79834fc3b8e5b14dbb0128a0ebfce63a38f.tar.bz2
Resolve an unsupported special case in arena_prof_tctx_set().
Add arena_prof_tctx_reset() and use it instead of arena_prof_tctx_set() when resetting the tctx pointer during reallocation, which happens whenever an originally sampled reallocated object is not sampled during reallocation. This regression was introduced by 594c759f37c301d0245dc2accf4d4aaf9d202819 (Optimize arena_prof_tctx_set().)
Diffstat (limited to 'src/huge.c')
-rw-r--r--src/huge.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/huge.c b/src/huge.c
index 187bdaa..f8778db 100644
--- a/src/huge.c
+++ b/src/huge.c
@@ -424,3 +424,10 @@ huge_prof_tctx_set(const void *ptr, prof_tctx_t *tctx)
extent_node_prof_tctx_set(node, tctx);
malloc_mutex_unlock(&arena->huge_mtx);
}
+
+void
+huge_prof_tctx_reset(const void *ptr)
+{
+
+ huge_prof_tctx_set(ptr, (prof_tctx_t *)(uintptr_t)1U);
+}