> Just because a process allocates a certain amount of address space doesn't mean it will use all of it.
Indeed.
> From the blog post, it sounds like Windows has a separate system call that is required to be used in-between allocating address space and actually using it.
Precisely. You can reserve pages in the address space[1] without committing physical memory to back those pages. You can then later commit pages[2] when you want to use parts of that address space, or decommit[3] pages when you're done using them, without changing the reserved address space.
Coming from a Windows background I much prefer this system. I understand why Linux, with its reliance on forking, has gone with the overcommit route, but I consider it a sub-par solution. At least for non-server systems.
> Coming from a Windows background I much prefer this system.
I come from a Linux background and I much prefer that system too.
Well, at least in theory, because in practice I don't usually run into these kinds of problems nowadays due to my hardware having significantly more memory than my software needs to run. But I still think Windows is designed more elegantly in that respect.
> I understand why Linux, with its reliance on forking, has gone with the overcommit route, but I consider it a sub-par solution.
Well, if Linux actually supported committing pages like Windows does, then there would be significantly less need for Linux to overcommit memory, because when forking you'd only have to reserve swap space for the committed memory of the process.
This means Linux wouldn't have to choose between reserving no swap space or reserving swap space for the entire address space (or some constant fraction of it, which Linux supports but doesn't make much sense either)!
Indeed.
> From the blog post, it sounds like Windows has a separate system call that is required to be used in-between allocating address space and actually using it.
Precisely. You can reserve pages in the address space[1] without committing physical memory to back those pages. You can then later commit pages[2] when you want to use parts of that address space, or decommit[3] pages when you're done using them, without changing the reserved address space.
Coming from a Windows background I much prefer this system. I understand why Linux, with its reliance on forking, has gone with the overcommit route, but I consider it a sub-par solution. At least for non-server systems.
[1]: https://learn.microsoft.com/en-us/windows/win32/memory/virtu...
[2]: https://learn.microsoft.com/en-us/windows/win32/api/memoryap...
[3]: https://learn.microsoft.com/en-us/windows/win32/api/memoryap...