MAP_POPulATE (since Linux 2.5.46) Populate (prefault) page tables for
a mapPing. For a file mapPing,this causes read-ahead on the file.
Later accesses to the mapPing will not be blocked by page faults.
MAP_POPulATE is only supported for private mapPings since linux
2.6.23.
基于我对mmap.c的linux内核源的粗略检查,看起来MAP_POPulATE与versions going back as far as 2.6.34中的MAP_PRIVATE完全没有关系.
以下是3.14内核实现中mmap.c的最新代码的摘录:
...1364 addr = mmap_region(file,addr,len,vm_flags,pgoff);1365 if (!IS_ERR_VALUE(addr) &&1366 ((vm_flags & VM_LOCKED) ||1367 (flags & (MAP_POPulATE | MAP_NONBLOCK)) == MAP_POPulATE))1368 *populate = len;1369 return addr;...
我的观察错了吗?
解决方法@H_301_32@ 自您提出问题后,措辞已更新:Before: MAP_POPulATE is only supported for private mapPings since linux 2.6.23.After: MAP_POPulATE is supported for private mapPings only since linux 2.6.23.
换句话说,您可以将MAP_POPulATE用于私有映射,但至少需要linux 2.6.23.
希望这能澄清它!
总结以上是内存溢出为你收集整理的带有MAP_POPULATE的Linux mmap(),手册页似乎给出了错误的信息全部内容,希望文章能够帮你解决带有MAP_POPULATE的Linux mmap(),手册页似乎给出了错误的信息所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)