Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@DavidSchwartz: you're nitpicking on technical details. if the OS decides to give that memory to firefox, then firefox takes away that memory from the other applications.
Well, I don't see the browser making these pages discardable, because the OS doesn't discard them. Can I ask you when was the last time you used the browser on a machine with scarce memory? You sound so confident, surely you have first-hand experience...
@DavidSchwartz: I think I understand it perfectly well. I explicitly mentioned all the main concepts modern OSes do to manage memory (please tell me if I missed something important). I also explicitly said that when memory is a scarce resource (e.g.: 1 or 2G with several competing applications), you have to be a good citizen otherwise the only thing the OS can do is to page the memory to disk (and in my experience, simply reloading the pages from the net is faster than trying to refetch pages from the disk).
@DavidSchwartz: and just for the record, I'm not saying that speculating that saved memory that can be used later is always a bad idea (hey, that's why we have FS cache). Sometimes or often it works. But saying that it's always beneficial and there's no point being a good citizen is.. well, ridiculous.
@DavidSchwartz: this is complete nonsense. what the hell is "directly transition the memory"? if memory is scarce, one application has to give so another can take (the alternative is the dreaded swapping..). "Modern operating systems do this very efficiently" - do what?? they can get rid of code and library pages because they can be re-fected, they can play with the FS cache pages, but cannot take away memory that's normally used (e.g.: firefox storing a closed tab or images so they can be opened faster).
-1. We multitask all the time, at least, I do. Freeing up memory is beneficial for other applications. I saw systems run out of memory (literally, killing a process), or do heavy swapping. Firefox is (or the plugins are) not a good a citizen when memory is scarce.