From 8554a150df65471e1adc0ec09bc27255e6967dd9 Mon Sep 17 00:00:00 2001 From: Igor Tarasov Date: Sat, 3 Oct 2020 15:42:28 +0300 Subject: [PATCH] Show allocated memory instead of application With some applications allocated memory shows more real picture of how much memory is actually used and could not be freed up. Fixes #17 --- package/contents/ui/main.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/contents/ui/main.qml b/package/contents/ui/main.qml index 8719720..e918813 100644 --- a/package/contents/ui/main.qml +++ b/package/contents/ui/main.qml @@ -84,7 +84,7 @@ Item { property string totalLoad: cpuSystem + "TotalLoad" property string memPhysical: "mem/physical/" property string memFree: memPhysical + "free" - property string memApplication: memPhysical + "application" + property string memAllocated: memPhysical + "allocated" property string memUsed: memPhysical + "used" property string swap: "mem/swap/" property string swapUsed: swap + "used" @@ -97,13 +97,13 @@ Item { property int swapUsedBytes: 0 property double swapUsedProportion: 0 - connectedSources: [memFree, memUsed, memApplication, swapUsed, swapFree, averageClock, totalLoad ] + connectedSources: [memFree, memUsed, memAllocated, swapUsed, swapFree, averageClock, totalLoad ] onNewData: { if (data.value === undefined) { return } - if (sourceName == memApplication) { + if (sourceName == memAllocated) { ramUsedBytes = parseInt(data.value) ramUsedProportion = fitMemoryUsage(data.value) }