mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-21 18:32:13 +03:00
Fix the cactive statistic.
Fix the cactive statistic to decrease (rather than increase) when active
memory decreases. This regression was introduced by
aa5113b1fd (Refactor overly large/complex
functions) and first released in 3.5.0.
This commit is contained in:
parent
46c0af68bd
commit
1ba886fb69
1 changed files with 3 additions and 3 deletions
|
|
@ -358,9 +358,9 @@ arena_cactive_update(arena_t *arena, size_t add_pages, size_t sub_pages)
|
|||
{
|
||||
|
||||
if (config_stats) {
|
||||
ssize_t cactive_diff = CHUNK_CEILING((arena->nactive +
|
||||
add_pages) << LG_PAGE) - CHUNK_CEILING((arena->nactive -
|
||||
sub_pages) << LG_PAGE);
|
||||
ssize_t cactive_diff = CHUNK_CEILING((arena->nactive + add_pages
|
||||
- sub_pages) << LG_PAGE) - CHUNK_CEILING(arena->nactive <<
|
||||
LG_PAGE);
|
||||
if (cactive_diff != 0)
|
||||
stats_cactive_add(cactive_diff);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue