Explanation of memory-related attributes of process in C #

Source: Internet
Author: User

Check msdn or locate the process class, and you will see that there are 20 memory-related attributes. to quickly find the desired attributes, here we will explain:

First, we need to understand several concepts: Virtual Memory, paging files, paging memory, physical memory, working sets, and dedicated memory (private memory, memory that cannot be shared)

Although there are so many naming rules, the names are different. Consider virtual memory, paging files, and paging memory as virtual memory (personal understanding ).

In addition, pay attention to a few tips. First, peak indicates the peak value. The attribute starting with peak indicates the amount of memory used, and the others are allocated memory;

Second, the long type is returned for the attribute ending with 64; otherwise, the int type is returned (the int type attribute is out of date). Third, the two return types are slightly special: maxworkingset and minworkingst, intptr indicates the number of bytes.

So 20 attributes minus 2 special ones, and all others have the same meaning as 64. Now there are 11 attributes with different meanings, you only need to understand the 11.

These 11 attributes are divided into four categories,

First, memorysize (may contain paging memory)

PagedMemorysize (64) original statement: Memory allocated by the associated process that can be written to the virtual memory page file (in bytes)

PeakpagedMemorysize (64) original statement: maximum memory size (in bytes) in the virtual memory paging file allocated to the associated process since the associated process is started ).

PrivateMemorysize (64): The amount of memory allocated to the associated process that cannot be shared with other processes (in bytes ).

Second, systemmemorysize (system memory, can it be understood that the system retains the memory for hardware)

PagedSystemmemorysize (64) original statement: the system has allocated memory (in bytes) for the associated processes that can be written to the virtual memory page files ).

NonpagedSystemmemorysize (64) original statement: the amount of system memory allocated for the associated process and cannot be written into the virtual memory paging file (in bytes ).

Third, memory amemorysize (Virtual Memory, paging memory)

Virtualmemorysize (64) original statement: volume of Virtual Memory allocated to the associated process (in bytes ).

PeakVirtualmemorysize (64) original statement: the maximum amount of virtual memory requested by the associated process (in bytes ).

Fourth, wokingset (Working Set, physical memory)

MaxWorkingset statement: Maximum Working Set size (in bytes) of processes allowed in the memory ).

MinWorkingset statement: Minimum Working Set size (in bytes) required by processes in the memory ).

PeakWorkingset (64) original statement: the maximum amount of physical memory allocated to the associated process since the associated process is started (in bytes ).

Workingset (64) original statement: total physical memory used by associated processes (in bytes ).

 

Based on the Dynamic Refresh effect, the memory size automatically adjusted in real time has three values:

Paging memory, private memory, and Working Set

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.