Small refactors around 7bb05e0.

This commit is contained in:
Qi Wang
2021-09-27 13:43:24 -07:00
committed by Qi Wang
parent 3c4b717ffc
commit 83f3294027
7 changed files with 21 additions and 23 deletions

View File

@@ -298,7 +298,7 @@ base_block_alloc(tsdn_t *tsdn, base_t *base, ehooks_t *ehooks, unsigned ind,
static ehooks_t *
base_ehooks_get_for_metadata(base_t *base) {
return base->metadata_use_hooks ? &base->ehooks :
(struct ehooks_s *)&ehooks_default_extent_hooks;
(ehooks_t *)&ehooks_default_extent_hooks;
}
/*
@@ -522,7 +522,7 @@ base_postfork_child(tsdn_t *tsdn, base_t *base) {
bool
base_boot(tsdn_t *tsdn) {
b0 = base_new(tsdn, 0,
(extent_hooks_t *)&ehooks_default_extent_hooks, true);
b0 = base_new(tsdn, 0, (extent_hooks_t *)&ehooks_default_extent_hooks,
/* metadata_use_hooks */ true);
return (b0 == NULL);
}

View File

@@ -570,8 +570,7 @@ arena_choose_hard(tsd_t *tsd, bool internal) {
/* Initialize a new arena. */
choose[j] = first_null;
arena = arena_init_locked(tsd_tsdn(tsd),
choose[j],
&arena_config_default);
choose[j], &arena_config_default);
if (arena == NULL) {
malloc_mutex_unlock(tsd_tsdn(tsd),
&arenas_lock);