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

malloc failure isn't just bound to running out of physical memory. It can fail because of fragmentation, with or without overcommit.


Sure, but I still have to design for random segfaults on memory writes. I guess I could write to all newly allocated pages and get a little more assurance that the allocation worked. I could still be whacked by a deduplicator, though unique writes would help.


I think when you run out of physical memory & swap, there's a bigger issue at that point. Or that's what the designers of overcommit decided.


OOM killer sends a SIGKILL. Writing to all pages will work for ensuring you actually got the memory. What a pain though.




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

Search: