From 04871a2d04361517f2e539810cb11e9e9898f0d0 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Thu, 7 Oct 2021 16:52:25 +1100 Subject: 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. --- linux/Platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/Platform.c b/linux/Platform.c index 4cd51554..e305e7fe 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -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; -- cgit v1.2.3