Skip to content

Commit

Permalink
Show allocated memory instead of application
Browse files Browse the repository at this point in the history
With some applications allocated memory shows more real picture
of how much memory is actually used and could not be freed up.

Fixes kotelnik#17
  • Loading branch information
TiGR committed Oct 3, 2020
1 parent 3eb845f commit 8554a15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package/contents/ui/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
}
Expand Down

0 comments on commit 8554a15

Please sign in to comment.