Still confused why working set larger than virtual memory

This is a discussion on Still confused why working set larger than virtual memory within the Tech Board forums, part of the Community Boards category; Hello everyone, Sorry that this question is related to another question I posted some time before because I have some ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    Still confused why working set larger than virtual memory

    Hello everyone,


    Sorry that this question is related to another question I posted some time before because I have some new findings and self-analysis.

    My question is why sometimes from perfmon on Windows, working set larger than virtual memory? I think virtual memory is the total size of memory (committed, reserved, shared, private) and working set is just the RAM touched by current process currently. Virtual memory should always larger than working set...

    But, I write a simple program to show working set is larger than virtual memory from perfmon. The program is simple, just open a couple of memory map files and read from beginning to the end.

    The only reason I could think of why working set sometimes is larger than virtual memory is, the OS memory management component may not reclaim some RAM consumed by current process even if the current process does not use the RAM. And keeping such RAM could improve performance if the process will use it in the future. But this point makes me confused because I think if it is true, such RAM does not have related virtual memory address, how could the current process utilize or even address (re-use to avoid hard page fault) it in the future?


    thanks in advance,
    George

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,893
    I have moved this thread to the Tech board as it does not seem to be specific to C++ programming.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,308
    I've never seen the working set larger than the virtual size. At this stage I'm inclined to be struck with disbelief.
    Care to post some numbers?
    What operating system?
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Hi iMalc,


    I am using Windows Server 2003. I watch the working set and virtual bytes counter from perfmon of iexplorer process (IE7 browser).

    It is usually the size of working set of larger than that of virtual bytes. I have uploaded the screen snapshot for your reference. It is appreciated if you could share some perspective. :-)

    Quote Originally Posted by iMalc View Post
    I've never seen the working set larger than the virtual size. At this stage I'm inclined to be struck with disbelief.
    Care to post some numbers?
    What operating system?

    regards,
    George
    Attached Images Attached Images  

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    1,579
    Thanks laserlight,


    Quote Originally Posted by laserlight View Post
    I have moved this thread to the Tech board as it does not seem to be specific to C++ programming.

    regards,
    George

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Virtual Memory utilization during run-time
    By wots_guge in forum C Programming
    Replies: 2
    Last Post: 04-13-2006, 08:17 PM
  2. virtual memory
    By sweets in forum C Programming
    Replies: 6
    Last Post: 11-06-2004, 05:55 AM
  3. Virtual functions not working
    By VanJay011379 in forum C++ Programming
    Replies: 2
    Last Post: 07-25-2002, 12:12 PM
  4. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 09:01 PM
  5. C++ XML Class
    By edwardtisdale in forum C++ Programming
    Replies: 0
    Last Post: 12-10-2001, 10:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21