-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It seems the smaps file layout in /proc changed in some kernel version. This commit fix it by: - Using smaps_rollup (available since kernel 4.14) instead of smaps to avoid having to loop over all entries (smaps_rollup being a summary of smaps). - If smaps_rollup is not available (kernel < 4.14), use smaps instead as before and sum all PSS lines. - Searching "Pss:" instead of using hardcoded offsets (which will probably go wrong again in the future). Fixes: #46
- Loading branch information
Showing
1 changed file
with
19 additions
and
39 deletions.
There are no files selected for viewing
This file contains 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