Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

See details of an app's virtual size UNIX
If you use top in Terminal, you may occasionally see apps with huge VSIZE values. I know this because Witch, one of our apps, is an example of such—it's VSIZE can exceed 11GB.

In trying to figure out why this was so (short answer seems to be: we can't control it, but it's not a problem), I ran across an interesting command, vmmap. This command will spew out a ton of detail about virtual memory usage. Stringing a couple Unix commands together, though, you can extract just the summary portion of the report.

In Terminal, run this command:
vmmap -resident PID# | grep "Summary for" -A 999
Replace PID# with the process ID you're interested in observing, and you'll get a nice summary of its virtual memory state. You can see what's virtual, and what's actually resident. Here's a bit of the output for Witch, for example:
...
REGION TYPE                      VIRTUAL RESIDENT
===========                      ======= ========
...
CG shared images                   1280K    1256K
CoreGraphics                         16K       8K
CoreServices                       6232K    6232K
IOKit (reserved)                  256.0M       0K
MALLOC                            337.3M    7932K
MALLOC (reserved)                   7.8G       0K
MALLOC freed, no zone              72.0M     212K
MALLOC guard page                   104K       0K
...
As you can see, although Witch has an 11GB virtual size, the biggest chunk (7.8GB) isn't using an real RAM—and best as I can tell, will never use any real RAM.

In doing my research, I found a couple of articles (1,2) that discuss large VSIZE values, and how they shouldn't be of concern. (The first linked article is where I ran into the vmmap command.)

Still, it's odd that this only happens to some apps, not all. Enlightenment welcomed, if you happen to be a virtual memory expert!
    •    
  • Currently 1.56 / 5
  You rated: 1 / 5 (16 votes cast)
 
[4,364 views]  

See details of an app's virtual size | 1 comments | Create New Account
Click here to return to the 'See details of an app's virtual size' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
See details of an app's virtual size
Authored by: cthree87 on Oct 19, '12 07:48:39AM

This article by Justin Dolske explains what these numbers actually mean
http://blog.mozilla.org/dolske/2007/10/16/os-x-and-virtual-bloat



[ Reply to This | # ]