Tell edatas their creation arena immediately.
This avoids having to pass it in anywhere else.
This commit is contained in:
parent
7c7b702064
commit
040eac77cc
@ -81,7 +81,7 @@ struct emap_split_prepare_s {
|
||||
bool emap_split_prepare(tsdn_t *tsdn, emap_t *emap, rtree_ctx_t *rtree_ctx,
|
||||
emap_split_prepare_t *split_prepare, edata_t *edata, size_t size_a,
|
||||
szind_t szind_a, bool slab_a, edata_t *trail, size_t size_b,
|
||||
szind_t szind_b, bool slab_b, unsigned ind_b);
|
||||
szind_t szind_b, bool slab_b);
|
||||
void emap_split_commit(tsdn_t *tsdn, emap_t *emap,
|
||||
emap_split_prepare_t *split_prepare, edata_t *lead, size_t size_a,
|
||||
szind_t szind_a, bool slab_a, edata_t *trail, size_t size_b,
|
||||
|
@ -468,6 +468,7 @@ base_alloc_edata(tsdn_t *tsdn, base_t *base) {
|
||||
if (edata == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
edata_arena_ind_set(edata, ehooks_ind_get(&base->ehooks));
|
||||
edata_esn_set(edata, esn);
|
||||
return edata;
|
||||
}
|
||||
|
@ -188,13 +188,13 @@ bool
|
||||
emap_split_prepare(tsdn_t *tsdn, emap_t *emap, rtree_ctx_t *rtree_ctx,
|
||||
emap_split_prepare_t *split_prepare, edata_t *edata, size_t size_a,
|
||||
szind_t szind_a, bool slab_a, edata_t *trail, size_t size_b,
|
||||
szind_t szind_b, bool slab_b, unsigned ind_b) {
|
||||
szind_t szind_b, bool slab_b) {
|
||||
/*
|
||||
* Note that while the trail mostly inherits its attributes from the
|
||||
* extent to be split, it maintains its own arena ind -- this allows
|
||||
* cross-arena edata interactions, such as occur in the range ecache.
|
||||
*/
|
||||
edata_init(trail, ind_b,
|
||||
edata_init(trail, edata_arena_ind_get(trail),
|
||||
(void *)((uintptr_t)edata_base_get(edata) + size_a), size_b,
|
||||
slab_b, szind_b, edata_sn_get(edata), edata_state_get(edata),
|
||||
edata_zeroed_get(edata), edata_committed_get(edata),
|
||||
|
@ -1281,7 +1281,7 @@ extent_split_impl(tsdn_t *tsdn, edata_cache_t *edata_cache, ehooks_t *ehooks,
|
||||
emap_split_prepare_t split_prepare;
|
||||
bool err = emap_split_prepare(tsdn, &emap_global, rtree_ctx,
|
||||
&split_prepare, edata, size_a, szind_a, slab_a, trail, size_b,
|
||||
szind_b, slab_b, ehooks_ind_get(ehooks));
|
||||
szind_b, slab_b);
|
||||
if (err) {
|
||||
goto label_error_b;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user