The project I work on, Mesa3D, routinely ignores malloc failures for a couple of reasons: no one knows how to reasonably test the additional code, and often no one has any idea what sort of graceful failure is even possible when malloc fails.<p>We&#x27;ve had some cargo culted patches to call _mesa_error_no_memory() when malloc fails, but it was recently noted that this can&#x27;t possibly work because it internally calls fprintf, and there&#x27;s no guarantee that fprintf doesn&#x27;t call malloc! In fact, glibc&#x27;s implementation does.<p>Suggestions for best practices welcome.