Extents: Eagerly initialize extent hooks.

When deferred initialization was added, initializing required copying
sizeof(extent_hooks_t) bytes after a pointer chase. Today, it's just a single
pointer loaded from the base_t. In subsequent diffs, we'll get rid of even that.
This commit is contained in:
David Goldblatt 2019-11-18 14:03:22 -08:00 committed by David Goldblatt
parent 4278f84603
commit 9f6eb09585
8 changed files with 173 additions and 201 deletions

View file

@ -195,7 +195,7 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
}
if (*zero && *commit) {
extent_hooks_t *extent_hooks =
EXTENT_HOOKS_INITIALIZER;
arena_get_extent_hooks(arena);
extent_t extent;
extent_init(&extent,
@ -204,7 +204,7 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
extent_state_active, false, true,
true, EXTENT_NOT_HEAD);
if (extent_purge_forced_wrapper(tsdn,
arena, &extent_hooks, &extent, 0,
arena, extent_hooks, &extent, 0,
size)) {
memset(ret, 0, size);
}