Blocking on allocation failure - WTF?
Posted Mar 12, 2011 0:15 UTC (Sat) by
giraffedata (subscriber, #1954)
In reply to:
Blocking on allocation failure - WTF? by epa
Parent article:
Delaying the OOM killer
This is true, you can get errors on accessing memory that was previously 'allocated'. But that's not a reason for doing the wrong thing in this specific case.
Which specific case are you referring to? The article is about the OOM killer, which comes into play when a process accesses memory (for example, executes a STORE instruction), not when a process does malloc(). In that case, how would you have the kernel notify the application program?
And even if we're talking about a case where the the user space program could be told that the system is out of memory and given the option to do something other than block, that wouldn't be acceptable because the user space programs have already been written. We want to do the best possible thing given existing programs. And even if we were talking about programs not yet written, there's something to be said for freeing the coder from worrying about these tedious, extremely rare situations.
(
Log in to post comments)