mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-26 10:37:19 +03:00
Enable per-tcache tcache_max
1. add tcache_max and nhbins into tcache_t so that they are per-tcache, with one auto tcache per thread, it's also per-thread; 2. add mallctl for each thread to set its own tcache_max (of its auto tcache); 3. store the maximum number of items in each bin instead of using a global storage; 4. add tests for the modifications above. 5. Rename `nhbins` and `tcache_maxclass` to `global_do_not_change_nhbins` and `global_do_not_change_tcache_maxclass`.
This commit is contained in:
parent
fbca96c433
commit
a442d9b895
15 changed files with 528 additions and 222 deletions
|
|
@ -55,6 +55,8 @@ struct tcache_slow_s {
|
|||
|
||||
struct tcache_s {
|
||||
tcache_slow_t *tcache_slow;
|
||||
unsigned tcache_nhbins;
|
||||
size_t tcache_max;
|
||||
cache_bin_t bins[TCACHE_NBINS_MAX];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue