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
The question isn't whether you can build a machine where it can succeed (easy, just define size_t too small), but if it can happen on the target one.
As-if rule does not allow you to make transformations based on some other theoretical target, only ones indistinguishable on the actual one.
You’re right. My response was more targeted towards the comment in the code, which assumes that malloc(-1) always fails.
On any system where arbitrary pointers can be preserved round-trip thru (size_t) cast, malloc(-1) necessarily fails.
This is observable at preprocessor level by defined(UINTPTR_MAX) && UINTPTR_MAX<=SIZE_MAX.
Proof is an immediate consequence of each array element having an address and pigeonhole principle.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.