Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

radek42

macrumors regular
Original poster
May 27, 2008
168
1
Here, there, and everywhere
Hi,

I am new to OS X, but I think I have basic understanding of memory management; clearly not enough :)

Here is the thing: I have 5.6GB of free memory (right after reboot; 8GB installed). All seems well, but I constantly see pages coming in in activity monitor; so far 512MB came in. There is no paging out which is expected considering there is enough free memory to use. Granted, I have 208GB VM size; frankly this is strange ...

I always thought that you first need to page out stuff from physical memory to HD before you can page in. What is coming in anyways?

The only thing that comes to my mind is System resume; I did restarted applications from last time. Is it possible that stuff stayed "paged out" and is come in? I guess I could do clean restart to test that :)

I wish to understand what is going on so any information is welcome.
Cheers,
R>

btw, I am using mini server with 10.7.2 and 8GB of memory (freshly installed).
 
Last edited:
Hmm, that did not take very long :)

I read about about memory management on developer.apple.com and I had a closer look. From a Page-in process section:

"The final phase of virtual memory management moves pages into physical memory, either from the backing store or from the file containing the page data. A memory access fault initiates the page-in process. A memory access fault occurs when code tries to access data at a virtual address that is not mapped to physical memory. There are two kinds of faults:

A soft fault occurs when the page of the referenced address is resident in physical memory but is currently not mapped into the address space of this process.
A hard fault occurs when the page of the referenced address is not in physical memory but is swapped out to backing store (or is available from a mapped file). This is what is typically known as a page fault."


If I read understand this correctly, you are talking about "soft fault" when process tries to access information mapped as "inactive". To make it "active" page-in call is initiated. Ergo, not all page-in calls require HDD access. It would be handy to know if page-ins calls are due to soft of hard faults.

Thanks for responding!
Cheers, R>

Page ins also occur whenever inactive memory is made active again.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.