NetBSD: simplify Platform_setMemoryValues

This commit is contained in:
Christian Göttsche 2021-08-30 19:24:40 +02:00 committed by BenBE
parent 9579d9b7aa
commit 7f95ed8528
1 changed files with 3 additions and 6 deletions

View File

@ -260,14 +260,11 @@ double Platform_setCPUValues(Meter* this, int cpu) {
void Platform_setMemoryValues(Meter* this) { void Platform_setMemoryValues(Meter* this) {
const ProcessList* pl = this->pl; const ProcessList* pl = this->pl;
long int usedMem = pl->usedMem;
long int buffersMem = pl->buffersMem;
long int cachedMem = pl->cachedMem;
this->total = pl->totalMem; this->total = pl->totalMem;
this->values[0] = usedMem; this->values[0] = pl->usedMem;
this->values[1] = buffersMem; this->values[1] = pl->buffersMem;
// this->values[2] = "shared memory, like tmpfs and shm" // this->values[2] = "shared memory, like tmpfs and shm"
this->values[3] = cachedMem; this->values[3] = pl->cachedMem;
// this->values[4] = "available memory" // this->values[4] = "available memory"
} }