Why is my memory still inactive after purging?

I'm trying to understand how memory is allocated on my machine. I have read, and believe I understand, these posts and associated links: Trouble Understanding Inactive Memory in MacOSX, Inactive Memory

However, I still have 10 GB of 'inactive' memory while a process is using ~25 GB of swap. My machine has 32 GB RAM and a single process is using 21GB Real Mem / 24 Private / 34 virtual.

Why is this process going to swap? Is it really using all that memory that's labeled inactive, or is it possible that something is wrong with my inactive memory? I've tried purgeing, but that had no effect according to activity monitor.


Solution 1:

I was doing some reading about inactive memory after wondering about it myself. My understanding is that inactive memory is memory containing programs and data which you have quit. OS X keeps the memory incase you decide to restart the program. Because it is still in memory it can start it much quicker. You can see this in action by quitting a large program and restarting it. It should start much faster than it originally did.

Inactive memory does not suck up your memory though because OS X regards it as still available for programs to use, jsut at a lower priority than free memory. ie. if OS X needs memory for another program, it will allocate memory from the free area, then the inactive allocation. So when thinking about how much memory you have free for applications to use, inactive and free is combined.

As for swap, if a program is using it you should easily be able to tell by the amount of I/O going on and a noticable slow down.

If you really want to see whats going on I would suggest download iStat menus which is a really nice tool for seeing the internals of your system and display various instruments in the menu bar.