3 ms·
Memory mapped files are very tricky outside the happy path. In particular recovery from errors and concurrent modification leading to undefined behaviour. It's
by CodesInChaos 6y ago
Memory mapped files are very tricky outside the happy path. In particular recovery from errors and concurrent modification leading to undefined behaviour. It's a good choice for certain use-cases, such as reading assets shipped with the application, where no untrusted process can write to the file and errors can be assumed to not happen.
For high performance code I'd use io_uring.