Bug 1857841 - pt 9. Count fresh and madvised memory separately r=glandium
commit02fb924e9b0de4727b9fb3703e4bad4d4c65e532
authorPaul Bone <pbone@mozilla.com>
Tue, 19 Mar 2024 01:42:43 +0000 (19 01:42 +0000)
committerPaul Bone <pbone@mozilla.com>
Tue, 19 Mar 2024 01:42:43 +0000 (19 01:42 +0000)
treef1e21243f5e60b31e0fc3fc11a19d4f8f09a5206
parent709bdf9e73bb36fc7bab6b7badaefff4c3a6a393
Bug 1857841 - pt 9. Count fresh and madvised memory separately r=glandium

This memory was previously measured as part of committed memory.  However
depending on the OS it will often not be committed.  It's more accurate to
count it separately as part of mozjemalloc's cache of unused pages.

This patch adds counters for both fresh and madvised memory and no-longer
counts either as "committed" as it previously did.

This has the side effect of changing decisions based on the size of this
cache such as when to purge memory.

Differential Revision: https://phabricator.services.mozilla.com/D200415
memory/build/mozjemalloc.cpp
memory/build/mozjemalloc_types.h
memory/replace/logalloc/replay/Replay.cpp