HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by arekp | Hacker News Reader
Full thread
arekp
·
False. malloc() fails with a negative argument.
View on HN
to3m
·
malloc's argument is of type size_t, which is unsigned.
arekp
·
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.
Reply on news.ycombinator.com