diff options
author | Jason Evans <jasone@canonware.com> | 2017-03-27 11:10:11 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2017-03-27 20:22:52 (GMT) |
commit | c6d1819e483ca226e27ca4cf81f7d850e4d4dc79 (patch) | |
tree | b4f1b6dab2991ffc3c17c151ba69103f35380722 /include/jemalloc | |
parent | 4020523f677fbbdac2d00de3fa7d29c395814a2d (diff) | |
download | jemalloc-c6d1819e483ca226e27ca4cf81f7d850e4d4dc79.zip jemalloc-c6d1819e483ca226e27ca4cf81f7d850e4d4dc79.tar.gz jemalloc-c6d1819e483ca226e27ca4cf81f7d850e4d4dc79.tar.bz2 |
Simplify rtree_clear() to avoid locking.
Diffstat (limited to 'include/jemalloc')
-rw-r--r-- | include/jemalloc/internal/rtree_inlines.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/jemalloc/internal/rtree_inlines.h b/include/jemalloc/internal/rtree_inlines.h index d3799cb..4b530df 100644 --- a/include/jemalloc/internal/rtree_inlines.h +++ b/include/jemalloc/internal/rtree_inlines.h @@ -506,10 +506,10 @@ rtree_szind_slab_update(tsdn_t *tsdn, rtree_t *rtree, rtree_ctx_t *rtree_ctx, JEMALLOC_INLINE void rtree_clear(tsdn_t *tsdn, rtree_t *rtree, rtree_ctx_t *rtree_ctx, uintptr_t key) { - rtree_leaf_elm_t *elm = rtree_leaf_elm_acquire(tsdn, rtree, rtree_ctx, - key, true, false); - rtree_leaf_elm_write(tsdn, rtree, elm, true, NULL, NSIZES, false); - rtree_leaf_elm_release(tsdn, rtree, elm); + rtree_leaf_elm_t *elm = rtree_read(tsdn, rtree, rtree_ctx, key, true); + assert(rtree_leaf_elm_extent_read(tsdn, rtree, elm, false, false) != + NULL); + rtree_leaf_elm_write(tsdn, rtree, elm, false, NULL, NSIZES, false); } #endif |