diff options
author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-01-07 17:46:15 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-01-07 19:30:23 +0100 |
commit | 560a04ad25c77a8c5bf4cec112a3d8da8df6272c (patch) | |
tree | 76bd2534fc2dae7c03bcd6fbbd815f21677e37df /darwin | |
parent | 29f0b3c5e1184421ee7796ab2e1841733c45f403 (diff) |
Improve code readability by creating constants for memory values
Diffstat (limited to 'darwin')
-rw-r--r-- | darwin/Platform.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/darwin/Platform.c b/darwin/Platform.c index 4b34d885..963d526d 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -264,11 +264,11 @@ void Platform_setMemoryValues(Meter* mtr) { double page_K = (double)vm_page_size / (double)1024; mtr->total = dpl->host_info.max_mem / 1024; - mtr->values[0] = (double)(vm->active_count + vm->wire_count) * page_K; - mtr->values[1] = (double)vm->purgeable_count * page_K; - // mtr->values[2] = "shared memory, like tmpfs and shm" - mtr->values[3] = (double)vm->inactive_count * page_K; - // mtr->values[4] = "available memory" + mtr->values[MEMORY_METER_USED] = (double)(vm->active_count + vm->wire_count) * page_K; + mtr->values[MEMORY_METER_BUFFERS] = (double)vm->purgeable_count * page_K; + // mtr->values[MEMORY_METER_SHARED] = "shared memory, like tmpfs and shm" + mtr->values[MEMORY_METER_CACHE] = (double)vm->inactive_count * page_K; + // mtr->values[MEMORY_METER_AVAILABLE] = "available memory" } void Platform_setSwapValues(Meter* mtr) { |