[PATCH] dynarray: Set errno on overflow-induced allocation failure

Paul Eggert eggert@cs.ucla.edu
Wed Aug 30 18:29:00 GMT 2017


On 08/30/2017 11:01 AM, DJ Delorie wrote:
> Ah, ok.  Consistency is good :-)

It's not just consistency, it's utility. If a memory allocator fails due 
to a request for 2**64 bytes of memory, ENOMEM is more likely to 
communicate useful info to the end user than any other errno value would.



More information about the Libc-alpha mailing list