summaryrefslogtreecommitdiffstats
path: root/netbsd
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-01-07 17:46:15 +0100
committerBenBE <BenBE@geshi.org>2023-01-07 19:30:23 +0100
commit560a04ad25c77a8c5bf4cec112a3d8da8df6272c (patch)
tree76bd2534fc2dae7c03bcd6fbbd815f21677e37df /netbsd
parent29f0b3c5e1184421ee7796ab2e1841733c45f403 (diff)
Improve code readability by creating constants for memory values
Diffstat (limited to 'netbsd')
-rw-r--r--netbsd/Platform.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/netbsd/Platform.c b/netbsd/Platform.c
index 5b4fd395..326458f0 100644
--- a/netbsd/Platform.c
+++ b/netbsd/Platform.c
@@ -270,11 +270,11 @@ double Platform_setCPUValues(Meter* this, int cpu) {
void Platform_setMemoryValues(Meter* this) {
const ProcessList* pl = this->pl;
this->total = pl->totalMem;
- this->values[0] = pl->usedMem;
- this->values[1] = pl->buffersMem;
- // this->values[2] = "shared memory, like tmpfs and shm"
- this->values[3] = pl->cachedMem;
- // this->values[4] = "available memory"
+ this->values[MEMORY_METER_USED] = pl->usedMem;
+ this->values[MEMORY_METER_BUFFERS] = pl->buffersMem;
+ // this->values[MEMORY_METER_SHARED] = "shared memory, like tmpfs and shm"
+ this->values[MEMORY_METER_CACHE] = pl->cachedMem;
+ // this->values[MEMORY_METER_AVAILABLE] = "available memory"
}
void Platform_setSwapValues(Meter* this) {

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