Edata: Move sn into its own field.
This lets the bins use a fragmentation avoidance policy that matches the HPA's (without affecting the PAC).
This commit is contained in:
committed by
David Goldblatt
parent
fb327368db
commit
d21d5b46b6
@@ -448,7 +448,7 @@ base_alloc_impl(tsdn_t *tsdn, base_t *base, size_t size, size_t alignment,
|
||||
|
||||
ret = base_extent_bump_alloc(base, edata, usize, alignment);
|
||||
if (esn != NULL) {
|
||||
*esn = edata_sn_get(edata);
|
||||
*esn = (size_t)edata_sn_get(edata);
|
||||
}
|
||||
label_return:
|
||||
malloc_mutex_unlock(tsdn, &base->mtx);
|
||||
|
@@ -458,8 +458,9 @@ hpa_try_alloc_one_no_grow(tsdn_t *tsdn, hpa_shard_t *shard, size_t size,
|
||||
|
||||
void *addr = hpdata_reserve_alloc(ps, size);
|
||||
edata_init(edata, shard->ind, addr, size, /* slab */ false,
|
||||
SC_NSIZES, /* sn */ 0, extent_state_active, /* zeroed */ false,
|
||||
/* committed */ true, EXTENT_PAI_HPA, EXTENT_NOT_HEAD);
|
||||
SC_NSIZES, /* sn */ hpdata_age_get(ps), extent_state_active,
|
||||
/* zeroed */ false, /* committed */ true, EXTENT_PAI_HPA,
|
||||
EXTENT_NOT_HEAD);
|
||||
edata_ps_set(edata, ps);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user