Skip to content

bug: switch over to procfs for linux mem usage #547

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

Merged
merged 3 commits into from
Jul 18, 2021
Merged

Conversation

ClementTsang
Copy link
Owner

Swap to manually calculating the mem total and usage via procfs. The usage calculation is now:

total - (free + cached + buffers + slab_reclaimable - shmem)

This follows the same usage calculation as htop. See the PR for more details.

Description

A description of the change and what it does. If relevant (such as any change that modifies the UI), please provide screenshots of the change:

Testing

If relevant, please state how this was tested. All changes must be tested to work:

Furthermore, mark which platforms this change was tested on. All platforms directly affected by the change must be tested

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts

Swap to manually calculating the mem total and usage via procfs.  The
usage calculation is now:

total - (free + cached + buffers + slab_reclaimable - shmem)

This follows the same usage calculation as htop.
@ClementTsang ClementTsang merged commit 7f24e62 into master Jul 18, 2021
@ClementTsang ClementTsang deleted the mem_fix_v3 branch July 18, 2021 01:25
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

Successfully merging this pull request may close these issues.

1 participant