diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-21 23:27:31 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-21 23:27:31 -0200 |
commit | 3383d8e5561dfc6fb2b65e0a194df94ccb5e08af (patch) | |
tree | dafba704561386b31b6b8af6dafb5b9a2ba7453c /MemoryMeter.c | |
parent | 36b78328843d0dae0d0fadbd0e814a8a1546327c (diff) |
Sorry about the mega-patch.
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
Diffstat (limited to 'MemoryMeter.c')
-rw-r--r-- | MemoryMeter.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/MemoryMeter.c b/MemoryMeter.c index 01516259..b2d45743 100644 --- a/MemoryMeter.c +++ b/MemoryMeter.c @@ -8,7 +8,7 @@ in the source distribution for its full text. #include "MemoryMeter.h" #include "CRT.h" -#include "ProcessList.h" +#include "Platform.h" #include <stdlib.h> #include <string.h> @@ -25,15 +25,8 @@ int MemoryMeter_attributes[] = { }; static void MemoryMeter_setValues(Meter* this, char* buffer, int size) { - long int usedMem = this->pl->usedMem; - long int buffersMem = this->pl->buffersMem; - long int cachedMem = this->pl->cachedMem; - usedMem -= buffersMem + cachedMem; - this->total = this->pl->totalMem; - this->values[0] = usedMem; - this->values[1] = buffersMem; - this->values[2] = cachedMem; - snprintf(buffer, size, "%ld/%ldMB", (long int) usedMem / 1024, (long int) this->total / 1024); + Platform_setMemoryValues(this); + snprintf(buffer, size, "%ld/%ldMB", (long int) this->values[0] / 1024, (long int) this->total / 1024); } static void MemoryMeter_display(Object* cast, RichString* out) { |