From 3383d8e5561dfc6fb2b65e0a194df94ccb5e08af Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Wed, 21 Jan 2015 23:27:31 -0200 Subject: Sorry about the mega-patch. This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.) --- MemoryMeter.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'MemoryMeter.c') 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 #include @@ -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) { -- cgit v1.2.3