3 ms·
Never really looked into it, but if the kernel overcommits memory, and multiple applications actually utilize that memory, it would occur outside the scope of m
by setr 4y ago
Never really looked into it, but if the kernel overcommits memory, and multiple applications actually utilize that memory, it would occur outside the scope of malloc, right? The kernel can’t pass an error to the app because it could occur at anytime during program execution — the only option is to OOM kill the app?
Only now thinking about it, doesn’t overcomitting make it impossible for programs to be well-behaved during high system load? Everything is lying to you up until the last second, when suddenly you’re dead by OOM killer. When does malloc even return errors in practice?