Skip to content
  • Pekka Paalanen's avatar
    README: establish no-malloc-failures policy · 93587067
    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: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
    93587067
After you've reviewed these contribution guidelines, you'll be all set to contribute to this project.
Loading