mmap报错:Permission denied

使用mmap映射内存需要对文件有读权限。

打开文件时,需要使用O_RDWR标志,不能以只写模式打开文件。

原文地址:https://www.cnblogs.com/HadesBlog/p/14687668.html