本文共 485 字,大约阅读时间需要 1 分钟。
今天看进程内存,如下图所示:
其中一个进程的%VSZ为125.7,甚为疑惑,查了下其算法
From BusyBox
top.c- /*top.c: * %VSZ = s->vsz/MemTotaltop.c- */
vzs is the size of the virtual memory used by the process (from /proc/<pid>/stat). This can include uninitialized memory and memory shared with other processes, and is therefore largely useless to determine how much memory a process actually needs.
MemTotal is found in /proc/meminfo, and is basically how much RAM you have.
该进程的VSZ为311m,设备的内存大小为 ,相除之后,果然与125.7吻合,是为记录,备忘。转载地址:http://fufsi.baihongyu.com/