c++ - Operations and functions that increase Virtual Bytes -


In order to keep some memory issues with 32-bit processes in Windows, I use some monitors Process that has started using the Performance Monitor

Although it is normal that virtual bytes are more than both private bytes and working sets, I came to know that there was a significant difference in my case, virtual byte very private bytes and working Set is higher than both.

Will the virtual bytes increase in specific operations and Win32 / CRT functions (C or C ++), but not private bytes and working sets?

I think it will be some kind of shared resource, if I understand the details of different counters in the performance monitor.


It seems that there is some (at least) confusion in the naming convention, for different applications in Windows releases similar to the memory counter for different applications. To do this, I put the following together:

Information from MSD N

According to the 32-bit process, 32-bit Windows user-mode virtual address space The range is usually 2 GB. It can be up to 3 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE and 4GT .

Virtual Bytes

The current size of the virtual bytes virtual address space, in bytes, the task manager and Win32 according to the process, in the monitor executed below, with the respective columns related to different counters. According to the framework. is using. The use of virtual address space is not necessarily necessary for the related use of disk or main memory pages. Virtual space is finite, and the process can limit its ability to load libraries.

Task Manager XP: N / A
Task Manager Vista: N / A
Structure: MemoryStudioXLite Virtual-MemoryStudusXLaValvernual

private bytes

Private bytes are in current size, in bytes, which are allocated to this process can not be shared with other processes.

H2>

The working set is the current size of the working set of this process, in the bytes, the working set is a set of recently hidden memory pages by thread in this process. If the computer is above free memory threshold, pages are left in a functioning set even if they are not in use. When the free memory falls below a threshold, the pages have to be sorted out from the work group, if they are necessary, they will be soft-fault back in the working set before leaving the main memory.

Task Manager XP: Mem Usage
Task Manager Vista: Working Set
Structure: PROCESS_MEMORY_COUNTERS_EX.WorkingSetSize

Things that can not increase (by virtual bites) without increasing the private bytes I can now think:

  • Binaries are often shared (i.e. not private), but occupied important address space. It can be larger than the binary size

  • To reserve sequential address space using the virtual olok / without using it.

  • Html

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -