What is private bytes, virtual bytes, working set?

Posted by Devil Jin on Stack Overflow See other posts from Stack Overflow or by Devil Jin
Published on 2009-12-31T06:16:34Z Indexed on 2010/04/28 20:57 UTC
Read the original article Hit count: 499

I am using perfmon windows utility to debug memory leak in a process.

Perfmon explaination:

Working Set- Working Set is the current size, in bytes, of the Working Set of this process. The Working Set is the set of memory pages touched recently by the threads in the process. If free memory in the computer is above a threshold, pages are left in the Working Set of a process even if they are not in use. When free memory falls below a threshold, pages are trimmed from Working Sets. If they are needed they will then be soft-faulted back into the Working Set before leaving main memory.

Virtual Bytes- Virtual Bytes is the current size, in bytes, of the virtual address space the process is using. Use of virtual address space does not necessarily imply corresponding use of either disk or main memory pages. Virtual space is finite, and the process can limit its ability to load libraries.

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

Q1. Is it the private byte should I measure to be sure if the process is having any leak as it does not involve any shared libraries and any leak if happening will be coming from the process itself?

Q2. What is the total memory consumed by the process? Is it the Virtual byte size? or Is it the sum of Virtual Bytes and Working Set

Q3. Is there any relation between private bytes, working set and virtual bytes.

Q4. Any tool which gives a better idea memory information?

© Stack Overflow or respective owner

Related posts about memory-leaks

Related posts about memory-usage