here's a malloc optimization (from Ralf Jung) that isn't as cute as the one from yesterdaypic.twitter.com/tXtvTrtva7
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
For example, saturating multiply then letting malloc fail, assuming mul didn't saturate if malloc succeeded.
well, this particular optimization only fires when the return value of malloc is only tested for null, it doesn't fire if it is used for real
making it (1) probably fairly harmless (2) probably fairly useless
Similarly (better example I think), calling calloc(n,m) and assuming n*m doesn't overflow if calloc succeeded.
Ah yes that one. We had to put “requires n*m < PTRDIFF_MAX” as pre-condition of calloc when we realized what was going on and that felt stupid. (NB “*” means mathematical multiplication in ACSL specifications)
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.