The next line after CPU usage summarizes statistics about shared libraries. Basically, a shared library is a set of code that multiple programs use in common. For example, the Secure Sockets Layer (SSL) libraries contain routines that are useful to many other programs. You don’t want each of those programs to have to implement its own SSL routines, nor do you want each to use memory on loading its own copy. So, they all can load the precompiled libssl and use its proven routines. To pull this off, multiple applications are able to share the code.
The MemRegions line lists the number and size of allocated memory regions. This is broken down into private (library and non-library) components and shared components. The PhysMem line is just what you’d expect: the breakdown of physical memory allocation. “Wired” memory is active memory that cannot be moved out of real RAM; it’s wired down. The active and inactive portions add up to how much memory is used. “Used” plus “free” equal the total RAM in your machine.
Like CPU usage, these RAM statistics are often misinterpreted. Don’t panic when free RAM is low; that’s just the way Mac OS X works. About the only time free RAM is high is just after booting up. However, as Mac OS X runs over time, it starts to fill RAM for different purposes. It doesn’t release RAM into the free pool immediately after a program is finished with it; rather, it then becomes “inactive.” Mac OS X keeps this data available in case it needs it. If not, and it really needs more real RAM for some task, it first purges the inactive memory to make room. Mac OS X has a sophisticated and effective memory management scheme that shuffles pages of memory out to disks, wires them down, caches memory, and frees it as needed.
The final line in the example displays statistics about virtual memory. The VM statistic does not refer to virtual memory as simple swapping to disk. The first statistic on that line represents the entire virtual address space currently in use. You can match this number by adding up everything in the VSIZE column. VSIZE is a fairly useless statistic under Mac OS X because Mac OS X always gives applications a generous virtual address space to work in. But VSIZE gives you a good sense of the total address space in use, or about how much RAM you would really need if Mac OS X had no virtual address space. Finally, you’ll see pageins and pageouts statistics. A pagein happens when a page is copied from “swap” (or the “backing store”) into main memory.