Open delgh1 opened 1 year ago
The difference is due to the fact that HyFetch calculates used memory by calculating (total - available)
for Linux kernel >3.14rc that provides available ram information. The original method calculates Memtotal + Shmem - MemFree - Buffers - Cached - SReclaimable
For example, if I log the calculated memory used value calculated before and after the change, the new calculation outputs a value higher than the original. I don't know which method is more accurate though.
Ah I see, thanks for the explanation. I was a little bit confused.
Personally speaking I would prefer hyfetch to display a value that's close to what free -h
says, to avoid such confusion.
Let's keep this issue open for a while and see what other people in the community thinks.
Okay, I'll open a vote for this in case anyone stumble upon this thread.
Total + Shmem - MemFree - Buffers - Cached - SReclaimable
Total - Available
Personally speaking I would prefer hyfetch to display a value that's close to what free -h says, to avoid such confusion.
You're asking the right solution to be reverted to the wrong one just because a random program decided to keep using the wrong solution. With all the respect, this shouldn't be considered. Your machine won't be consuming less memory if a given application says so.
Measuring memory consumption is not a subjective matter, and having your system freezing because you're trusting wrong information is anything but nice. The kernel is clearly the most reliable source of memory information, so the new approach implemented by @hykilpikonna is the one that should be used.
@hykilpikonna, thanks for implementing the right solution and giving people the right to vote (but let's stick with the right solution, hahaha). :)
Description
The "used memory" is way larger than it should be. For example, both
neofetch
andfree -h
displays 290MiB-ish, but hyfetch says 900+MiB usedhyfetch:
Config file
~/.config/hyfetch.json
{"preset": "rainbow", "mode": "rgb", "light_dark": "dark", "lightness": 0.5, "color_align": {"mode": "horizontal", "custom_colors": [], "fore_back": null}, "backend": "neofetch", "distro": null}