Re:In C, how do you know if the dynamic allocation succeeded?
by angry_octet on Tuesday November 09, 2021 @09:14AM
(#29161969)
OOM kill exists because swap is not being useful. A process failure is something you can deal with, livelock isn't. If you have an algorithm that works out of core then you'll never hit swap because you maintain the working set below memory limits.
> If you actually hit swap the system effectively deadlocks anyway
that depends. In many cases in the past the options would be either with swap and thus slow or pretty much not at all. And again these days there is so much memory that there is always a way to avoid the swapping. Though i've met funny situations in recent years like when a several terabyte sized database process would get killed by the OOMKiller on a machine with overcommit left on and no swap configured.