4 ms·
Yes, many have tried to use strict overcommit on the desktop. It is a good footgun. https://unix.stackexchange.com/a/797888/1027 https://unix.stackexchange.com/
by man8alexd 3mo ago
Yes, many have tried to use strict overcommit on the desktop. It is a good footgun. https://unix.stackexchange.com/a/797888/1027 https://unix.stackexchange.com/a/797888/1027
- IshKebab 3mo agoThat doesn't really explain why it is a footgun.
- man8alexd 3mo agoThe last paragraph: > On the modern desktop, where programmers don't care about failing malloc(), disabling overcommit is shooting yourself in the foot. As you can observe, the memory allocations start failing long before the memory is exhausted.
- senfiaj 3mo agoSo it's a footgun because a lot of low quality software?
- man8alexd 3mo agoIs Firefox low quality?
- senfiaj 3mo agoWell, if Firefox also works on other OSes, it probably should gracefully handle failing allocations, isn't it?
- man8alexd 3mo agoNo, it doesn't handle failing allocations gracefully - https://unix.stackexchange.com/questions/797841/firefox-died-with-vm-enough-memory-not-enough-memory-for-the-allocation-des#comment1534064_797841 https://unix.stackexchange.com/questions/797841/firefox-died...
- silon42 3mo agoI lost cookies several times on disk-full condition...
- IshKebab 3mo agoIf a memory allocations fails with strict mode then you'll get a null pointer returns and some kind of crash or panic (in code that doesn't handle it properly). If it fails with the default mode the whole process will get killed by the OS. Is that really much better?
- man8alexd 3mo agoOOM is better. If a program doesn't handle ENOMEM properly, then its state is unpredictable and can lead to data corruption.
- IshKebab 3mo agoI don't think it's as simple as that. Killing a program can have unintended consequences too, e.g. corrupting files they were in the middle of writing.