mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-02 16:40:29 +03:00
Use rtree tracked states to protect edata outside of ecache locks.
This avoids the addr-based mutexes (i.e. the mutex_pool), and instead relies on the metadata tracked in rtree leaf: the head state and extent_state. Before trying to access the neighbor edata (e.g. for coalescing), the states will be verified first -- only neighbor edatas from the same arena and with the same state will be accessed.
This commit is contained in:
parent
9ea235f8fe
commit
1784939688
7 changed files with 366 additions and 277 deletions
|
|
@ -78,7 +78,8 @@ eset_insert(eset_t *eset, edata_t *edata) {
|
|||
|
||||
void
|
||||
eset_remove(eset_t *eset, edata_t *edata) {
|
||||
assert(edata_state_get(edata) == eset->state);
|
||||
assert(edata_state_get(edata) == eset->state ||
|
||||
edata_state_in_transition(edata_state_get(edata)));
|
||||
|
||||
size_t size = edata_size_get(edata);
|
||||
size_t psz = sz_psz_quantize_floor(size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue