summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-10-07 16:52:25 +1100
committerNathan Scott <nathans@redhat.com>2021-10-12 17:46:16 +1100
commit04871a2d04361517f2e539810cb11e9e9898f0d0 (patch)
tree31b3a135117c9b0d8ae65f49bde27d2d34e1a572
parentb7248f6cb82350b683adf42d0fd4ec917397ea05 (diff)
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.
-rw-r--r--linux/Platform.c4
1 files 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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy