Unify extent_alloc_wrapper with the other wrappers.

Previously, it was really more like extents_alloc (it looks in an ecache for an
extent to reuse as its primary allocation pathway).  Make that pathway more
explciitly like extents_alloc, and rename extent_alloc_wrapper_hard accordingly.
This commit is contained in:
David Goldblatt 2019-12-12 17:30:28 -08:00 committed by David Goldblatt
parent d8b0b66c6c
commit ae23e5f426
4 changed files with 50 additions and 36 deletions

View file

@ -159,9 +159,10 @@ large_ralloc_no_move_expand(tsdn_t *tsdn, edata_t *edata, size_t usize,
new_mapping = false;
}
} else {
if ((trail = extent_alloc_wrapper(tsdn, arena, ehooks,
edata_past_get(edata), trailsize, 0, CACHELINE, false,
SC_NSIZES, &is_zeroed_trail, &commit)) == NULL) {
if ((trail = extents_alloc_grow(tsdn, arena, ehooks,
&arena->ecache_retained, edata_past_get(edata), trailsize,
0, CACHELINE, false, SC_NSIZES, &is_zeroed_trail, &commit))
== NULL) {
return true;
}
if (config_stats) {