mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 22:03:07 +00: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:
@@ -358,9 +358,9 @@ arena_cactive_update(arena_t *arena, size_t add_pages, size_t sub_pages)
|
|||||||
{
|
{
|
||||||
|
|
||||||
if (config_stats) {
|
if (config_stats) {
|
||||||
ssize_t cactive_diff = CHUNK_CEILING((arena->nactive +
|
ssize_t cactive_diff = CHUNK_CEILING((arena->nactive + add_pages
|
||||||
add_pages) << LG_PAGE) - CHUNK_CEILING((arena->nactive -
|
- sub_pages) << LG_PAGE) - CHUNK_CEILING(arena->nactive <<
|
||||||
sub_pages) << LG_PAGE);
|
LG_PAGE);
|
||||||
if (cactive_diff != 0)
|
if (cactive_diff != 0)
|
||||||
stats_cactive_add(cactive_diff);
|
stats_cactive_add(cactive_diff);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user