POSIX环境提供至少两种访问文件的方法.有标准的系统调用open(),read(),write(),和朋友,但也有使用的选项mmap(),将文件映射到虚拟内存.
open()
read()
write()
mmap()
何时优先使用一个而不是另一个?它们各自的优势是什么,包括两个接口?
c file-io posix mmap
当我尝试研究一些处理 FPGA 的代码时,我遇到了 munmap、mmap。
我仔细阅读此处提供的手册。我仍然不明白这个功能的目的。这究竟是做什么的?
c c++ linux system-calls
c ×2
c++ ×1
file-io ×1
linux ×1
mmap ×1
posix ×1
system-calls ×1