-
Pekka Paalanen authored
There are many reasons why trying to handle malloc() returning NULL by any other way than calling abort() is not beneficial: - Usually malloc() does not return NULL, thanks to memory overcommit. Instead, the program gets SIGSEGV signal when it tries to access the memory. - Trying to handle NULL will create failure paths that are impractical to test. There is no way to be sure the compositor still works once such path is actually taken. - Those failure path will clutter the code, increasing maintenance and development burden. - Sometimes there just isn't a good way to handle the failure. For more discussion, see the issue link below. Closes: wayland/weston#631 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
93587067
Loading