Extents: Have extent_dalloc_gap take ehooks.

We're almost to the point where the extent code doesn't know about arenas at
all.  In that world, we shouldn't pull them out of the arena.
This commit is contained in:
David Goldblatt 2020-03-09 12:20:06 -07:00 committed by David Goldblatt
parent 22a0a7b93a
commit 3192d6b77d
3 changed files with 8 additions and 5 deletions

View File

@ -33,7 +33,8 @@ edata_t *ecache_evict(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,
edata_t *extent_alloc_wrapper(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,
void *new_addr, size_t size, size_t alignment, bool slab, szind_t szind,
bool *zero, bool *commit);
void extent_dalloc_gap(tsdn_t *tsdn, arena_t *arena, edata_t *edata);
void extent_dalloc_gap(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,
edata_t *edata);
void extent_dalloc_wrapper(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,
edata_t *edata);
void extent_destroy_wrapper(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,

View File

@ -1026,9 +1026,8 @@ extent_record(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks, ecache_t *ecache,
}
void
extent_dalloc_gap(tsdn_t *tsdn, arena_t *arena, edata_t *edata) {
ehooks_t *ehooks = arena_get_ehooks(arena);
extent_dalloc_gap(tsdn_t *tsdn, arena_t *arena, ehooks_t *ehooks,
edata_t *edata) {
witness_assert_depth_to_rank(tsdn_witness_tsdp_get(tsdn),
WITNESS_RANK_CORE, 0);

View File

@ -186,7 +186,10 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
extent_dss_extending_finish();
if (gap_size_page != 0) {
extent_dalloc_gap(tsdn, arena, gap);
ehooks_t *ehooks = arena_get_ehooks(
arena);
extent_dalloc_gap(tsdn, arena, ehooks,
gap);
} else {
edata_cache_put(tsdn,
&arena->pa_shard.edata_cache, gap);