https://stackoverflow.com/questions/18845857/what-does-anon-rss-and-total-vm-mean/22326766
As I understand, the size of the virtual memory that a process uses is listed as "total-vm". Part of it is really mapped into the RAM itself (allocated and used). This is "RSS".
Part of the RSS is allocated in real memory blocks (other than mapped into a file or device). This is anonymous memory ("anon-rss") and there is also RSS memory blocks that are mapped into devices and files ("file-rss").
So, if you open a huge file in vim, the file-rss would be high, on the other side, if you malloc() a lot of memory and really use it, your anon-rss would be high also. 【popexizhi: 这个是分配了并且在用,基本是一起high】
On the other side, if you allocate a lot of space (with malloc()), but nevers use it, the total-vm would be higher, but no real memory would be used (due to the memory overcommit), so, the rss values would be low. [popexizhi: 这里解释看来是进程分配了过多内存,但是自己没有用啊!!! 这个是站着xxx不xxx的典型吗?!kill它就是理所当然了:) . ]
ps:
total-vm、anon-rss和file-rss含义:
- total-vm:进程总共使用的虚拟内存;
- anon-rss:虚拟内存实际占用的物理内存;
- file-rss:虚拟内存实际占用的磁盘空间
没有评论:
发表评论