summaryrefslogtreecommitdiffstats
path: root/dragonflybsd
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 /dragonflybsd
parent29f0b3c5e1184421ee7796ab2e1841733c45f403 (diff)
Improve code readability by creating constants for memory values
Diffstat (limited to 'dragonflybsd')
-rw-r--r--dragonflybsd/Platform.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index ea5f4fa4..b3a82bf3 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -208,11 +208,11 @@ 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