mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-20 01:11:15 +03:00
Allocate increasingly large base blocks.
Limit the total number of base block by leveraging the exponential size class sequence, similarly to extent_grow_retained().
This commit is contained in:
parent
675701660c
commit
69aa552809
2 changed files with 44 additions and 27 deletions
|
|
@ -21,11 +21,18 @@ struct base_s {
|
|||
* User-configurable extent hook functions. Points to an
|
||||
* extent_hooks_t.
|
||||
*/
|
||||
atomic_p_t extent_hooks;
|
||||
atomic_p_t extent_hooks;
|
||||
|
||||
/* Protects base_alloc() and base_stats_get() operations. */
|
||||
malloc_mutex_t mtx;
|
||||
|
||||
/*
|
||||
* Most recent size class in the series of increasingly large base
|
||||
* extents. Logarithmic spacing between subsequent allocations ensures
|
||||
* that the total number of distinct mappings remains small.
|
||||
*/
|
||||
pszind_t pind_last;
|
||||
|
||||
/* Serial number generation state. */
|
||||
size_t extent_sn_next;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue