|
|
Subscribe / Log in / New account

Quotes of the week

Quotes of the week

Posted Nov 28, 2009 23:54 UTC (Sat) by nix (subscriber, #2304)
In reply to: Quotes of the week by oak
Parent article: Quotes of the week

Exactly. *If* you test these things (look e.g. at sqlite for a clue as to
just how hard that is), then that's one thing. If you don't have a
malloc() that can inject OOM on demand, and don't use it to force your
allocations to fail individually, then error-checking them is pretty much
a waste of time, at least if you do anything but quit. (I *have* found
that reporting which allocation failed can be useful in cases where a bug
leads to runaway allocation. But there's still little point doing anything
but exit(1) afterwards. Let some higher layer in a monitoring process or
something like that handle recovery.)


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds