* Returns a pool-locked extent_t * if there's one associated with the given * address, and NULL otherwise. */
| 160 | * address, and NULL otherwise. |
| 161 | */ |
| 162 | static extent_t * |
| 163 | extent_lock_from_addr(tsdn_t *tsdn, rtree_ctx_t *rtree_ctx, void *addr, |
| 164 | bool inactive_only) { |
| 165 | extent_t *ret = NULL; |
| 166 | rtree_leaf_elm_t *elm = rtree_leaf_elm_lookup(tsdn, &extents_rtree, |
| 167 | rtree_ctx, (uintptr_t)addr, false, false); |
| 168 | if (elm == NULL) { |
| 169 | return NULL; |
| 170 | } |
| 171 | lock_result_t lock_result; |
| 172 | do { |
| 173 | lock_result = extent_rtree_leaf_elm_try_lock(tsdn, elm, &ret, |
| 174 | inactive_only); |
| 175 | } while (lock_result == lock_result_failure); |
| 176 | return ret; |
| 177 | } |
| 178 | |
| 179 | extent_t * |
| 180 | extent_alloc(tsdn_t *tsdn, arena_t *arena) { |
no test coverage detected