by matheusmoreira · 4y ago · 0 comments
That's what mmap does: maps the entire file into the address space of the process while letting the kernel load the pages as they are touched. I assume that would improve performance significantly but I'm not sure if anyone's tried it.
However mmaping files which can be modified by another process concurrently is tricky. You can just get killed by SIGBUS.