mmap 是一种内存映射技术,mmap 相比于传统的 IO 来说,其实就是少了 1 次 CPU 拷贝而已,上图。
在 Linux 中,提供 sendFile 函数,实现了零拷贝
Welcome to here