而且出现shared的进程以前同样存在,但没有shared内存
代码: 全选
top -b -n 1 -o SHR
代码: 全选
top -b -n 1 -o SHR
看看 不同的 Ubuntu 版本 對於 SHR 格式 與 功能描述 有何不同记得以前free输出的shared内存为0,我这现在为何很多进程都有shared?
受您提示,对比了free的两个manpoloshiao 写了:看看 不同的 Ubuntu 版本 對於 SHR 格式 與 功能描述 有何不同记得以前free输出的shared内存为0,我这现在为何很多进程都有shared?
Ubuntu 12.04
http://manpages.ubuntu.com/manpages/pre ... top.1.html
t: SHR -- Shared Mem size (kb)
The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes.
已被使用
Ubuntu 14.04 及 以後
http://manpages.ubuntu.com/manpages/tru ... top.1.html
21. SHR -- Shared Memory Size (KiB)
The amount of shared memory available to a task, not all of which is typically resident. It simply reflects memory that could be potentially shared with other processes.
可以被用來
但我没有思考出这个值非0的原因,The value is zero if none of the entries is exported by the kernel.
1. http://manpages.ubuntu.com/manpages/pre ... ree.1.html12.04的版本说shared是过时的东西?
但我没有思考出这个值非0的原因,
3. 因為我們目前的 kernel 版本是比 2.6 新 所以 上面這一句話 可以簡化成The shared memory column represents either the MemShared value (2.4 series kernels) or the Shmem value (2.6 series kernels and later) taken from the /proc/meminfo file. The value is zero if none of the entries is exported by the kernel.