News for hackers. Stuff that matters.
Re:If malloc fails, it's not for the obvious reason by arekp on Saturday November 03, 2012 @04:53AM (#4736233)
False. malloc() fails with a negative argument.
Re:If malloc fails, it's not for the obvious reason by to3m on Saturday November 03, 2012 @08:54AM (#4736492)
malloc's argument is of type size_t, which is unsigned.
Re:If malloc fails, it's not for the obvious reason by arekp on Saturday November 03, 2012 @05:58PM (#4738050)
Extending my comment, I am almost sure that passing a small negative argument (which is converted to a large positive number) causes malloc to return NULL on Linux.