linux: show M_PRIV instead of M_SHARE in default columns#1955
Open
ugolnikovE wants to merge 1 commit intohtop-dev:mainfrom
Open
linux: show M_PRIV instead of M_SHARE in default columns#1955ugolnikovE wants to merge 1 commit intohtop-dev:mainfrom
ugolnikovE wants to merge 1 commit intohtop-dev:mainfrom
Conversation
Replace M_SHARE (SHR) with M_PRIV (PRIV) in the default Main screen columns on Linux. M_PRIV shows the process's private memory (RES - SHR), which is a more actionable metric for understanding per-process memory cost than the shared pages size alone. Also document M_PRIV in the man page. Closes htop-dev#492 Signed-off-by: Evgeny Ugolnikov <evgeny.ugolnik@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces M_SHARE with M_PRIV in the default Linux Main screen columns, as suggested in #492. M_PRIV (RES - SHR) is a more actionable per-process memory metric than shared pages alone.
M_RESIDENT is kept as it remains the de-facto standard memory column across process viewers. M_SHARE is removed since it becomes redundant with M_PRIV. Users who want either column back can re-add them via the Setup screen (F2).
PCP also exposes M_PRIV but its defaults are left unchanged to keep this PR focused on Linux; happy to extend in a follow-up if desired.
Also documents M_PRIV in the man page.
Tested on Debian aarch64 with a fresh config: PRIV column appears in place of SHR, sorting works, config saves and reloads cleanly.
Closes #492