summaryrefslogtreecommitdiffstats
path: root/openbsd
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 /openbsd
parent29f0b3c5e1184421ee7796ab2e1841733c45f403 (diff)
Improve code readability by creating constants for memory values
Diffstat (limited to 'openbsd')
-rw-r--r--openbsd/Platform.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index b222bee0..6e9d6cdf 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -227,11 +227,11 @@ void Platform_setMemoryValues(Meter* this) {
long int cachedMem = pl->cachedMem;
usedMem -= buffersMem + cachedMem;
this->total = pl->totalMem;
- this->values[0] = usedMem;
- this->values[1] = buffersMem;
- // this->values[2] = "shared memory, like tmpfs and shm"
- this->values[3] = cachedMem;
- // this->values[4] = "available memory"
+ this->values[MEMORY_METER_USED] = usedMem;
+ this->values[MEMORY_METER_BUFFERS] = buffersMem;
+ // this->values[MEMORY_METER_SHARED] = "shared memory, like tmpfs and shm"
+ this->values[MEMORY_METER_CACHE] = cachedMem;
+ // this->values[MEMORY_METER_AVAILABLE] = "available memory"
}
void Platform_setSwapValues(Meter* this) {

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