Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical: Memory Info Calculation Error due to Interchanged Variable Names #535

Open
Muhammed-Rahif opened this issue Feb 8, 2024 · 0 comments

Comments

@Muhammed-Rahif
Copy link

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:
#525
#336
#417

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant