3 ms·
macOS overcommits; not sure about some of the other BSDs do by default but I'm fairly sure they have knobs for it.
by saagarjha 7y ago
macOS overcommits; not sure about some of the other BSDs do by default but I'm fairly sure they have knobs for it.
- wahern 7y agoAFAIU, macOS implements dynamic swap and I assumed it always backed anonymous memory with swap reservations. Do you have a reference?
- saagarjha 7y agoHmm, maybe I'm misunderstanding? When you make a (single) patently large allocation, macOS will do nothing; it won't show up as used virtual memory and the swap size won't go up. As you write to the memory usage will go up ("Memory" in Activity Monitor) but then it will quickly start swapping out until the limits of your disk, at which point you'll get OOM'd (assuming that your memory doesn't compress well, that is…).
- wahern 7y agoAh, I see. Thanks!