4 ms·
How is your MAP_NOSYNC any different from just using mlock?
by hyc_symas 12y ago
How is your MAP_NOSYNC any different from just using mlock?
- otterley 12y agomdbm 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).