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

Consult memory computing issues🙏 #1890

Closed
SuCicada opened this issue Apr 12, 2024 · 1 comment
Closed

Consult memory computing issues🙏 #1890

SuCicada opened this issue Apr 12, 2024 · 1 comment

Comments

@SuCicada
Copy link

I have been modifying the memory calculation function of htop-dev/htop recently. ( htop-dev/htop#1439 )

I found the exelban/stats memory calculation formula to be very accurate.

I want to know where this memory calculation formula comes from, Can you tell me where it comes from? Thank you very much

let used = active + inactive + speculative + wired + compressed - purgeable - external

@exelban
Copy link
Owner

exelban commented Apr 15, 2024

😅😅😅

Hi. I will say the truth: I have no idea. It was a long time ago😅
But I'm pretty sure there is some issue with the discussion about that.

active + inactive + speculative + wired + compressed - purgeable - external

Basically I just take all used memory (active, inactive, speculative, wired, and compressed) and subtract those that are not used (purgeable, external). I'm pretty sure there is no additional memory that could be used in the calculation.

@exelban exelban closed this as completed Apr 21, 2024
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

2 participants