返回博主主页

零拷贝,mmap 和 sendFile

传统的 IO

image

mmap

mmap 是一种内存映射技术,mmap 相比于传统的 IO 来说,其实就是少了 1 次 CPU 拷贝而已,上图。
image

sendFile

在 Linux 中,提供 sendFile 函数,实现了零拷贝
image

posted @ 2024-02-26 16:24  懒惰的星期六  阅读(24)  评论(0编辑  收藏  举报

Welcome to here

主页