Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

add Slab memory to cached #263

Closed
wants to merge 1 commit into from
Closed

Conversation

MartinSavc
Copy link

I use Fedora 22, kernel 4.1.6.

On my system free and htop report drastically different application memory usage. It comes down to how cached memory is calculated. Free adds Cached and Slab entries from memoryinfo, while htop only reads Cached.

I've prepared a simple fix.

Regards,
Martin

@OmegaPhil
Copy link

I'm assuming you're still subscribed to this pull request - why was it closed? It does partly fix a serious problem with htop-reported memory usage, although it needs to use SReclaimable rather than Slab due to the latter's SUnreclaim part.

@MartinSavc
Copy link
Author

My pull request was a quick fix after a small amount of research for a problem I've noticed on my system. After submitting the request I've took a closer look at past submissions for htop, and others have submitted pull request for complete solutions. Therefore I've removed mine, since it wouldn't make sense to merge it instead of other solutions.
I've noticed my error later on as well, but again I saw no benefit in fixing it as other have proposed a complete solutions before me.
See for example #151.

@OmegaPhil
Copy link

Oh wow, its been sat there for a year?? Sorry I did a search and hit on your pull, thought I got lucky but it seems this problem has been ignored for some time... thanks for responding.

hishamhm added a commit that referenced this pull request Nov 29, 2015
reclaimable slab as cached memory.

Hopefully this presents a more truthful representation of
available vs. used memory on Linux.
See brndnmtthws/conky#82, #242, #67, #263.
KoffeinFlummi pushed a commit to KoffeinFlummi/htop-vim that referenced this pull request Nov 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants