Emap: Move edata modification out of emap_remap.
This commit is contained in:
parent
12eb888e54
commit
dfef0df71a
@ -1067,7 +1067,8 @@ arena_prof_promote(tsdn_t *tsdn, void *ptr, size_t usize) {
|
||||
edata_t *edata = emap_edata_lookup(tsdn, &emap_global, ptr);
|
||||
|
||||
szind_t szind = sz_size2index(usize);
|
||||
emap_remap(tsdn, &emap_global, edata, szind, false);
|
||||
edata_szind_set(edata, szind);
|
||||
emap_remap(tsdn, &emap_global, edata, szind, /* slab */ false);
|
||||
|
||||
prof_idump_rollback(tsdn, usize);
|
||||
|
||||
@ -1079,7 +1080,8 @@ arena_prof_demote(tsdn_t *tsdn, edata_t *edata, const void *ptr) {
|
||||
cassert(config_prof);
|
||||
assert(ptr != NULL);
|
||||
|
||||
emap_remap(tsdn, &emap_global, edata, SC_NBINS, false);
|
||||
edata_szind_set(edata, SC_NBINS);
|
||||
emap_remap(tsdn, &emap_global, edata, SC_NBINS, /* slab */ false);
|
||||
|
||||
assert(isalloc(tsdn, ptr) == SC_LARGE_MINCLASS);
|
||||
|
||||
|
@ -206,7 +206,6 @@ void emap_remap(tsdn_t *tsdn, emap_t *emap, edata_t *edata, szind_t szind,
|
||||
bool slab) {
|
||||
EMAP_DECLARE_RTREE_CTX;
|
||||
|
||||
edata_szind_set(edata, szind);
|
||||
if (szind != SC_NSIZES) {
|
||||
rtree_szind_slab_update(tsdn, &emap->rtree, rtree_ctx,
|
||||
(uintptr_t)edata_addr_get(edata), szind, slab);
|
||||
|
@ -487,6 +487,7 @@ extent_split_interior(tsdn_t *tsdn, pa_shard_t *shard, ehooks_t *ehooks,
|
||||
}
|
||||
|
||||
if (leadsize == 0 && trailsize == 0) {
|
||||
edata_szind_set(*edata, szind);
|
||||
emap_remap(tsdn, &emap_global, *edata, szind, slab);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user