据我了解,在 Linux 上 /proc/(pid)/status 的输出为您提供以下数字,这些数字加起来就是“VmRSS”(驻留集大小):
VmRSS: 11060 kB
RssAnon: 4644 kB
RssFile: 6416 kB
RssShmem: 0 kB
Run Code Online (Sandbox Code Playgroud)
proc 的手册页有:
* RssAnon: Size of resident anonymous memory. (since Linux 4.5).
* RssFile: Size of resident file mappings. (since Linux 4.5).
* RssShmem: Size of resident shared memory (includes System V shared memory, mappings
from tmpfs(5), and shared anonymous mappings). (since Linux 4.5).
Run Code Online (Sandbox Code Playgroud)
我还是有点不清楚这些数字对应什么。一些问题: