mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 00:23:33 +03:00
Stats: Fix tcache_bytes reporting.
Previously, large allocations in tcaches would have their sizes reduced during stats estimation. Added a test, which fails before this change but passes now. This fixes a bug introduced in5934846612, which was itself fixing a bug introduced in9c0549007d.
This commit is contained in:
parent
a5780598b3
commit
2e5899c129
2 changed files with 52 additions and 2 deletions
|
|
@ -207,7 +207,8 @@ arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
|
|||
cache_bin_t *tbin = &descriptor->bins_large[i];
|
||||
arena_stats_accum_zu(&astats->tcache_bytes,
|
||||
cache_bin_ncached_get(tbin,
|
||||
&tcache_bin_info[i + SC_NBINS]) * sz_index2size(i));
|
||||
&tcache_bin_info[i + SC_NBINS])
|
||||
* sz_index2size(i + SC_NBINS));
|
||||
}
|
||||
}
|
||||
malloc_mutex_prof_read(tsdn,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue