Use exponential series to size extents.
If virtual memory is retained, allocate extents such that their sizes form an exponentially growing series. This limits the number of disjoint virtual memory ranges so that extent merging can be effective even if multiple arenas' extent allocation requests are highly interleaved. This resolves #462.
This commit is contained in:
@@ -1686,6 +1686,9 @@ arena_new(tsdn_t *tsdn, unsigned ind)
|
||||
|
||||
arena->extent_hooks = (extent_hooks_t *)&extent_hooks_default;
|
||||
|
||||
if (!config_munmap)
|
||||
arena->extent_grow_next = psz2ind(HUGEPAGE);
|
||||
|
||||
ql_new(&arena->extent_cache);
|
||||
if (malloc_mutex_init(&arena->extent_cache_mtx, "arena_extent_cache",
|
||||
WITNESS_RANK_ARENA_EXTENT_CACHE))
|
||||
|
||||
Reference in New Issue
Block a user