summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/internal/jemalloc_internal_inlines_a.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/jemalloc/internal/jemalloc_internal_inlines_a.h')
-rw-r--r--include/jemalloc/internal/jemalloc_internal_inlines_a.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_a.h b/include/jemalloc/internal/jemalloc_internal_inlines_a.h
index 854fb1e..24ea416 100644
--- a/include/jemalloc/internal/jemalloc_internal_inlines_a.h
+++ b/include/jemalloc/internal/jemalloc_internal_inlines_a.h
@@ -146,7 +146,10 @@ tcache_get(tsd_t *tsd) {
}
static inline void
-pre_reentrancy(tsd_t *tsd) {
+pre_reentrancy(tsd_t *tsd, arena_t *arena) {
+ /* arena is the current context. Reentry from a0 is not allowed. */
+ assert(arena != arena_get(tsd_tsdn(tsd), 0, false));
+
bool fast = tsd_fast(tsd);
++*tsd_reentrancy_levelp_get(tsd);
if (fast) {