Linux Memory---from top view

Source: Internet
Author: User



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:

    1. In addition to the shared memory of its own processes, it also includes shared memory for other processes.

    2. Even though the process uses only a few shared libraries, it calculates the size of the entire shared library.

    3. After swap out, this value will drop


Virt

    1. 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.

    2. 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.

    3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.