aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2017-12-22 11:19:50 -0800
committerQi Wang <interwq@gmail.com>2018-01-05 13:05:17 -0800
commit91b247d311ce6837aa93d4315f5f7680abd8a11a (patch)
tree86d66df8099c3dd53ce435710ea2c7461e218df5 /include
parent78a87e4a80e9bf379c0dc660374173ef394252f6 (diff)
downloadplatform_external_jemalloc_new-91b247d311ce6837aa93d4315f5f7680abd8a11a.tar.gz
platform_external_jemalloc_new-91b247d311ce6837aa93d4315f5f7680abd8a11a.tar.bz2
platform_external_jemalloc_new-91b247d311ce6837aa93d4315f5f7680abd8a11a.zip
In iallocztm, check lock rank only when not in reentrancy.
Diffstat (limited to 'include')
-rw-r--r--include/jemalloc/internal/jemalloc_internal_inlines_c.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/jemalloc/internal/jemalloc_internal_inlines_c.h b/include/jemalloc/internal/jemalloc_internal_inlines_c.h
index c54fc992..499ac1b1 100644
--- a/include/jemalloc/internal/jemalloc_internal_inlines_c.h
+++ b/include/jemalloc/internal/jemalloc_internal_inlines_c.h
@@ -45,8 +45,10 @@ iallocztm(tsdn_t *tsdn, size_t size, szind_t ind, bool zero, tcache_t *tcache,
assert(size != 0);
assert(!is_internal || tcache == NULL);
assert(!is_internal || arena == NULL || arena_is_auto(arena));
- witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),
- WITNESS_RANK_CORE, 0);
+ if (!tsdn_null(tsdn) && tsd_reentrancy_level_get(tsdn_tsd(tsdn)) == 0) {
+ witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),
+ WITNESS_RANK_CORE, 0);
+ }
ret = arena_malloc(tsdn, arena, size, ind, zero, tcache, slow_path);
if (config_stats && is_internal && likely(ret != NULL)) {