3 ms·
So why would you mmap?
by 0c3ca83 20d ago
So why would you mmap?
- Asmod4n 20d agoto not let the bytes i forward enter userspace, i serve from the page cache for the asset path, directly from a zip file. i open the file, mmap it, close it and tell io_uring_prep_send which bytes from the mapping to send, this also saves me from a possible SIGBUS cause the access to the mmap happen inside the kernel, and when a SIGBUS would happen in userspace the kernel just reports a shorter send in cqe->res