Limit to exact fit on Windows with retain off.
W/o retain, split and merge are disallowed on Windows. Avoid doing first-fit which needs splitting almost always. Instead, try exact fit only and bail out early.
This commit is contained in:
parent
5742473cc8
commit
c9cdc1b27f
10
src/extent.c
10
src/extent.c
@ -445,6 +445,16 @@ extents_first_fit_locked(tsdn_t *tsdn, arena_t *arena, extents_t *extents,
|
|||||||
extent_t *ret = NULL;
|
extent_t *ret = NULL;
|
||||||
|
|
||||||
pszind_t pind = sz_psz2ind(extent_size_quantize_ceil(size));
|
pszind_t pind = sz_psz2ind(extent_size_quantize_ceil(size));
|
||||||
|
|
||||||
|
if (!maps_coalesce && !opt_retain) {
|
||||||
|
/*
|
||||||
|
* No split / merge allowed (Windows w/o retain). Try exact fit
|
||||||
|
* only.
|
||||||
|
*/
|
||||||
|
return extent_heap_empty(&extents->heaps[pind]) ? NULL :
|
||||||
|
extent_heap_first(&extents->heaps[pind]);
|
||||||
|
}
|
||||||
|
|
||||||
for (pszind_t i = (pszind_t)bitmap_ffu(extents->bitmap,
|
for (pszind_t i = (pszind_t)bitmap_ffu(extents->bitmap,
|
||||||
&extents_bitmap_info, (size_t)pind);
|
&extents_bitmap_info, (size_t)pind);
|
||||||
i < SC_NPSIZES + 1;
|
i < SC_NPSIZES + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user