Too simple to fail
Too simple to fail
Posted Mar 11, 2015 15:24 UTC (Wed) by lgeorget (guest, #99972)In reply to: Too simple to fail by dgm
Parent article: Allowing small allocations to fail
> With all that in mind, the only approach that makes sense in my mind is introducing new allocation primitives that do the right thing (fail if no memory is available) and urge everybody to migrate to they, and forbid new use of the old ones. Finally, put a hard line for removal of the faulty allocation primitives.
First rule of kernel development is not breaking legacy user code. Any new error that would come out of the kernel that did not before is considered "breaking user space". For example, as they say in the article, returning ENOMEM in some system calls that would always succeed (perhaps through triggering the OOM as a side effect) before. New allocation primitives won't help you against that.