2 ms·
Choosing mmap() gets you something that works sooner than later. But then you have a pile of blocking-style synchronous code likely exploiting problematic assu
by pengaru 5y ago
Choosing mmap() gets you something that works sooner than later.
But then you have a pile of blocking-style synchronous code likely exploiting problematic assumptions to rewrite when you realize you want something that doesn't just work, but works well.
- germandiago 5y agommap + C++ coroutines can be combined.
- pengaru 5y agoAnd? So you're going to take a syscall (mincore()?) hit before every file-backed mapping access to test if it'd incur a page fault, and try switch to another coroutine if it would? Syscalls aren't free, especially today, and mmap() is already bringing significant overhead to the party. If you've brought coroutines into the picture, you might as well schedule them using async IO completions and kick mmap() to the curb.
- jandrewrogers 5y agoWhat problem does this solve? Use of mmap() tends to imply blocking calls.