3 ms·
The Windows memory model is different. With some OSes, you can happily over allocate and everything's great. Malloc won't fail, and so long not every page ends
by MichaelGG 12y ago
The Windows memory model is different. With some OSes, you can happily over allocate and everything's great. Malloc won't fail, and so long not every page ends up being touched, you're fine. But as soon as you go over, bam OOM killer.
On Windows, every allocation gets reserved by actual memory, so it's easier to run into a situation where you would start failing malloc. So having swap is more important.
Also, I think that anonymous mmap is backed by the pagefile. So anything using mmap without specifying a file is going to increase your pagefile needs.