Report hugepage memory as real and used memory (as before)

This is real, physical memory available for applications to
use.  We should not try to pretend otherwise; its confusing
for users and inconsistent with all other tools.
This commit is contained in:
Nathan Scott 2021-10-07 16:52:25 +11:00
parent b7248f6cb8
commit 04871a2d04
1 changed files with 2 additions and 2 deletions

View File

@ -331,8 +331,8 @@ void Platform_setMemoryValues(Meter* this) {
const ProcessList* pl = this->pl;
const LinuxProcessList* lpl = (const LinuxProcessList*) pl;
this->total = pl->totalMem > lpl->totalHugePageMem ? pl->totalMem - lpl->totalHugePageMem : pl->totalMem;
this->values[0] = pl->usedMem > lpl->totalHugePageMem ? pl->usedMem - lpl->totalHugePageMem : pl->usedMem;
this->total = pl->totalMem;
this->values[0] = pl->usedMem;
this->values[1] = pl->buffersMem;
this->values[2] = pl->sharedMem;
this->values[3] = pl->cachedMem;