Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> No non-embedded libc will actually return NULL.

malloc(-1) should always return NULL. Malloc returns NULL if the virtual address space for a given process is exhausted.

It will not return NULL when the system is out of memory (depending on the overcommit settings)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: