diff options
author | Nathan Scott <nathans@redhat.com> | 2023-05-02 16:56:18 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-05-08 13:06:38 +1000 |
commit | 72235d8e098d9d79029dca65122605741e1aafad (patch) | |
tree | 96593b8bd9dc95dc5ab321bd363d36351cbd0a99 /linux/HugePageMeter.c | |
parent | 0bdade1b6cb40c5bd374a93ac0489058a7421bb5 (diff) |
Adapt platform code for the new Machine base class
Move host-centric data to new derived <Platform>Machine classes,
separate from process-list-centric data.
Diffstat (limited to 'linux/HugePageMeter.c')
-rw-r--r-- | linux/HugePageMeter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/HugePageMeter.c b/linux/HugePageMeter.c index 0e429444..ec3804ee 100644 --- a/linux/HugePageMeter.c +++ b/linux/HugePageMeter.c @@ -16,7 +16,7 @@ in the source distribution for its full text. #include "Object.h" #include "ProcessList.h" #include "RichString.h" -#include "linux/LinuxProcessList.h" +#include "linux/LinuxMachine.h" static const char* HugePageMeter_active_labels[4] = { NULL, NULL, NULL, NULL }; @@ -43,8 +43,8 @@ static void HugePageMeter_updateValues(Meter* this) { memory_t usedTotal = 0; unsigned nextUsed = 0; - const LinuxProcessList* lpl = (const LinuxProcessList*) this->host->pl; - this->total = lpl->totalHugePageMem; + const LinuxMachine* host = (const LinuxMachine*) this->host; + this->total = host->totalHugePageMem; this->values[0] = 0; HugePageMeter_active_labels[0] = " used:"; for (unsigned i = 1; i < ARRAYSIZE(HugePageMeter_active_labels); i++) { @@ -52,7 +52,7 @@ static void HugePageMeter_updateValues(Meter* this) { HugePageMeter_active_labels[i] = NULL; } for (unsigned i = 0; i < HTOP_HUGEPAGE_COUNT; i++) { - memory_t value = lpl->usedHugePageMem[i]; + memory_t value = host->usedHugePageMem[i]; if (value != MEMORY_MAX) { this->values[nextUsed] = value; usedTotal += value; |