News for hackers. Stuff that matters.
Re:Why Does Calloc Exist? by pwdisswordfish9 on Sunday November 13, 2022 @04:01AM (#33581332)
Was there a specification back when this was written? Did it specify what it does now?
Re:Why Does Calloc Exist? by tedunangst on Sunday November 13, 2022 @10:27AM (#33583870)
Yes, the function is defined to either return enough memory for the requested number of objects, or null. Returning less than enough memory is clearly out of spec. This was later stated explicitly, but at no time was it ever permitted.