Top See the memory has res shr virt several
These kinds of things have different meanings:
Res:
1. Memory currently in use by the process, including heap memory allocated by various methods such as malloc new, and stack memory for program method calls. However, swap out space is not included.
2. Includes shared space for other processes.
3. If the process has requested 10MB of memory and only 1MB is actually used, res grows 1MB. This is the opposite of Virt.
4. Memory consumption of shared libraries: only the size of the memory occupied by the loaded library files is counted
5. Res = memory occupied by code + data
Shr:
In addition to the shared memory of its own processes, it also includes shared memory for other processes.
Even though the process uses only a few shared libraries, it calculates the size of the entire shared library.
After swap out, this value will drop
Virt
The size of the virtual memory that the process needs to use, including the library, code, data, and the size of the heap space and stack space allocated by malloc and new.
If the process needs to request 10MB of memory, the actual use of 1MB, such as the maximum and minimum heap space for Tomcat configuration is 10MB, then it will grow 10MB instead of 1Mb.
Virt = swap + res
This article is from the Linux and networking blogs, so be sure to keep this source http://khaozi.blog.51cto.com/952782/1775044
Linux Memory---from top view