My advice on implementing stuff in C:
My advice on implementing stuff in C:
Posted Oct 21, 2010 3:00 UTC (Thu) by foom (subscriber, #14868)In reply to: My advice on implementing stuff in C: by wahern
Parent article: Russell: On C Library Implementation
With the default settings on many distros, you're much more likely to just get a random process on your box forcibly killed when you run out of memory than for malloc to fail. So, there's really not much point in being able to gracefully handle malloc failure...
Just so long as pid 1 can deal with malloc failure, that's pretty much good enough: it can just respawn any other daemon that gets forcibly killed or aborts due to malloc failure.
