Stacer icon indicating copy to clipboard operation
Stacer copied to clipboard

Critical: Memory Info Calculation Error due to Interchanged Variable Names

Open Muhammed-Rahif opened this issue 1 year ago • 0 comments

I have been looking around why the system monitor of the ubuntu and stacer memory info are not same. There are more than one issues regarding this issue in this repo already (mentioned below).

The issue is caused by https://github.com/oguzhaninan/Stacer/blob/native/stacer-core/Info/memory_info.cpp#L32-L33 where the variable names are interchanged mistakenly. Which is later causes inacuracy for measuring memory usage.

For more understading: Screenshot from 2024-02-09 02-40-30 Requesting change:

- sreclaimable = getValue(6);
- shmem = getValue(7);
+ shmem = getValue(6);
+ sreclaimable = getValue(7);

This also have impact on the next lines where the memory usage actually calculates.

And: From my findings, fixing this will not make the ubuntu system monitor and stacer same on calculation. Maybe because when calculating memory usage, the ubuntu system monitor and stacer differs, more info: https://stackoverflow.com/a/41251290/14781260

Related: https://github.com/oguzhaninan/Stacer/issues/525 https://github.com/oguzhaninan/Stacer/issues/336 https://github.com/oguzhaninan/Stacer/issues/417

Muhammed-Rahif avatar Feb 08 '24 21:02 Muhammed-Rahif