Skip to content
Related Articles
Open in App
Not now

Related Articles

Private bytes, Virtual bytes, Working set

Improve Article
Save Article
  • Difficulty Level : Hard
  • Last Updated : 02 Nov, 2022
Improve Article
Save Article

In this article, we are going to understand private bytes, virtual bytes, and working sets.

Private Bytes :
As a result of completely paging out the process’s private memory footprint to swap, Private Bytes summarizes the amount of RAM allocated to the process (though not necessarily used).

Process executables use Private Bytes only to request memory. It doesn’t mean that they are actually using the memory they have requested. Private Bytes are considered “private” since they (usually) exclude memory-mapped files (e.g. shared DLLs). They do exclude some memory, however, but not all memory is allocated by those files. Neither the executable nor the linked library is able to determine when private bytes change. In addition, private bytes are not just restricted to physical memory. They can also be paged to disk or listed in the standby page list (not in use yet, but not yet paged either).

Private Bytes are the actual bytes allocated by your app, including pagefile usage. in general, private bytes are the overall committed memory. while the working set refers to the memory that is backed by RAM.

Private Bytes is the current size, in bytes, of memory that this process has allocated that cannot be shared with other processes.

Virtual Bytes :
Virtual Bytes are the total amount of virtual address space that a process occupies. Similar to the working set, this set includes memory-mapped files (shared DLLs), as well as data that has already been paged out and resides on a disk somewhere. When a system is under heavy load, the total virtual memory used by all processes is significantly greater than actual available memory.

virtual bytes=working set+private bytes+standby list.

Working Set :
It refers to the amount of physical memory (RAM) the process uses. The measurement is less accurate since it also includes memory-mapped files and other resources, unlike private bytes. In recent years, Task Manager’s “Mem Usage” also reports the same value that has caused endless amounts of confusion. The Working Set runs on physical memory. However, the standby page list does not appear in the Working Set as it is still in memory, so when you minimize an application, the “Mem Usage” might suddenly drop.

It includes non-paged Private Bytes as well as memory-mapped files;

Under any process, By default Task Manager displays the Working Set:

and Process Explorer shows all Private Bytes, Working Set, and Virtual Bytes.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!