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

> You can't really on linux. There's no way to do sparse allocations then because when you turn off overcommit MAP_NORESERVE still reserves memory...

Sure, but ... what does that have to do with this thread? Using `mmap` is not the same as using `malloc` and friends.

If you turn off overcommit, malloc will return NULL on failure to allocate. If you specifically request mmap to ignore overcommit, and it does, why are you surprised?



> If you specifically request mmap to ignore overcommit, and it does, why are you surprised?

You misunderstand, you specifically request mmap to ignore overcommit, and it doesn't, not does.

What it has to do with this thread is it makes turning off overcommit on linux an exceptionally unpalatable option because it makes a lot of correct software incorrect in an unfixable manner.




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

Search: