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

I've read that malloc(3) will not always return errors when you expect them to [1]. Any comment on this?

[1] http://news.ycombinator.com/item?id=4735589



I expect it to fail when it runs out of address space, or when address space fragmentation prevents it from fulfilling the request. Isn't that exactly when it fails?


It is unlikely the world will change, so adjust your expectations.

Also keep checking for error returns according to the API, though, as that is a 'not always'.




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

Search: