mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-19 19:36:33 +03:00
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:
parent
c1baa0a9b7
commit
411697adcd
3 changed files with 199 additions and 32 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue