• [^] # Re: Ne le fait pas.

    Posté par (site web personnel) . En réponse au journal realloc. Évalué à 9.

    Et sa conclusion:

    So in summary, OOM-safety is wrong:

    • Because it increases your code size by 30%-40%
    • You're trying to be more catholic than the pope, since various systems services you build on and interface with aren't OOM-safe anyway
    • You are trying to solve the wrong problem. Real OOM wil be signalled via SIGKILL, not malloc() returning NULL.
    • You are trying to solve the wrong problem. Make sure your app never loses data, not only when malloc() returns NULL
    • You can barely test the OOM codepaths