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

How is your MAP_NOSYNC any different from just using mlock?


mdbm uses a file-backed mmap region so you're implicitly saying you do want some sort of persistence. Also, mlock locks the heap in RAM to keep it from being swapped - mdbm's regions aren't heap space.

There's a mmap flag on Linux called MAP_LOCKED but I'm not sure how it behaves with MAP_SHARED, which mdbm uses (the man page isn't clear).




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

Search: