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

fix: use .PhysicalAvailableMemory instead of PhysicalFreeMemory to show memory usage #6216

Merged
merged 7 commits into from
Mar 3, 2025

Conversation

Edu4rdSHL
Copy link
Contributor

Prerequisites

  • I have read and understood the contributing guide.
  • The commit message follows the conventional commits guidelines.
  • Tests for the changes have been added (for bug fixes / features).
  • Docs have been added/updated (for bug fixes / features).

Description

When showing memory usage, what you want to know is the really used memory, which doesn't include cached memory; cache memory can be claimed by the kernel under memory pressure.

The Linux kernel will try to use as much cache as possible by default, but that doesn't mean that the RAM is not available. This PR fixes that and shows only the real used memory.

allcontributors bot and others added 7 commits March 1, 2025 17:12
…o show memory usage

When showing memory usage, what you want to know is the really **used** memory, which doesn't include cached memory; cache memory can be claimed by the kernel under memory pressure.

The Linux kernel will try to use as much cache as possible by default, but that doesn't mean that the RAM is not available. This PR fixes that and shows only the real used memory.
@JanDeDobbeleer JanDeDobbeleer changed the base branch from main to next March 3, 2025 11:56
@JanDeDobbeleer JanDeDobbeleer merged commit 230e645 into JanDeDobbeleer:next Mar 3, 2025
12 checks passed
@JanDeDobbeleer
Copy link
Owner

@all-contributors please add @Edu4rdSHL for design,doc

This is pure magic 🪄! @holopin-bot @Edu4rdSHL wizard

Copy link

holopin-bot bot commented Mar 3, 2025

Congratulations @Edu4rdSHL, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cm7t090hv18200cl8clfug1ew

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

Copy link
Contributor

@JanDeDobbeleer

I've put up a pull request to add @Edu4rdSHL! 🎉

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.

2 participants