How does memory management work in Mac OS X?

I am a university student who has been trying to write a compare and contrast paper between how Windows, Linux, and Mac OS X manage memory. For instance, with Windows, it's physical memory (RAM) and virtual memory (paging file). How does a Mac do this?

So far, the only information I've found on the topic has been people screaming about one of the releases for Mac OS X and how it had memory leaks. Please keep in mind, I am not a Mac user, so I'm not looking for instructions on how to check memory being used, etc. A link to an article or document that explains how it works would be most appreciated.

I found this: http://www.macosxautomation.com/applescript/apps/memory.html, but it deals more with garbage collection in Objective-C than the OS's internal memory management.


Apple documents the lowest levels of the Mach Kernel and the virtual memory subsystem fairly well on the web as part of it's developer documentation.

  • Kernel Programming Guide: Memory and Virtual Memory

Since that kernel was developed by Carnegie Mellon University, you can find dozens of papers describing it quite easily.

If that is too low level for your paper, we have easily 10 or more good questions covering more of a non-programmer's view of OS X memory management. You'll probably have to do the synthesis of how OS X compares to the other two OS as I haven't seen that answered here to date.

Focus on the virtual-memory and os-x tags for the best results in your searching:

  • What does it mean if I have lots of "Inactive" memory at the end of a work day?
  • Can I force my Mac to make better use of the inactive memory?
  • Why is my memory still inactive after purging?
  • Trouble Understanding Inactive Memory in MacOSX
  • Isn't Inactive memory a waste of resources?

By the sheer number of "inactive memory" questions, you can focus on the part of OS X's memory management that is most puzzling to people and hence gathers the most questions here looking for explanations.


See Apple's documentaion on Memory Management. Also see the answers to this AskDifferent question


Mac OS X provides a demand-paged virtual memory system very similar to the one provided by BSD Unix.