]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
linprocfs(4): Fixup process size in the /proc/pid/stat file
authorDmitry Chagin <dchagin@FreeBSD.org>
Sun, 26 Feb 2023 13:42:22 +0000 (16:42 +0300)
committerDmitry Chagin <dchagin@FreeBSD.org>
Wed, 1 Mar 2023 09:45:56 +0000 (12:45 +0300)
commit867e8404efed7a33553646b89588831db1a2102b
tree8d6be73b185e879b094531c28543195605d12871
parent1054a068aa97b663a464a3ff5d02d4f42d5657f1
linprocfs(4): Fixup process size in the /proc/pid/stat file

According to the Linux sources the kernel exposes a proces virtual
memory size via proc filesystem into the three files - stat, status
and statm. This is the struct mm->total_vm value adjusted to the
corresponding units - bytes, kilobytes and pages.

The fix is based on a fernape@ analysis.

PR: 265937
Reported by: Ray Bellis
MFC after: 3 days

(cherry picked from commit a55b5a9aed3981fcec205e246436991d138c78a2)
sys/compat/linprocfs/linprocfs.c