Hacker News new | ask | show | jobs
by LoganDark 968 days ago
Read up on Windows. Windows does not do overcommit whatsoever, unless swap is enabled, in which case it only allows overcommit up to the size of the swap file.

Overcommit cannot be enabled without a swap file, whatsoever. This differs from Linux that can tend to have overcommit enabled without swap.

2 comments

Yes, Windows doesn't have overcommit. (Also not with swap, since overcommit is unbacked virtual memory, which Windows still doesn't allow. The only thing it allows is disk-backed virtual memory).

But as a user, I don't care (except that I don't have to worry about an OOM killer because an allocation will just fail). The only real difference is that application developers need to be careful with allocating memory without using it, unlike on Unix-likes.

Because software on Linux runs on the assumption of overcommit, you shouldn't disable it, even though the lack of overcommit on Windows is not problematic.

You're correct, that's why having pagefile is important for Windows even if there's enough RAM. Why don't you enable it?
It takes up disk space that I thought I could save. I have it enabled now, as a side effect of working with LLMs on my new computer that only has 16GB of memory (working on fixing that).

I still wouldn't be comfy letting Firefox fill it up, because no matter how large the page file is, your system will always crash when Firefox fills the entire thing. I do not know if my new computer will have this problem, though.