From 72235d8e098d9d79029dca65122605741e1aafad Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Tue, 2 May 2023 16:56:18 +1000 Subject: Adapt platform code for the new Machine base class Move host-centric data to new derived Machine classes, separate from process-list-centric data. --- linux/HugePageMeter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'linux/HugePageMeter.c') 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; -- cgit v1.2.3