Chinaunix首页 | 论坛 | 博客
  • 博客访问: 326210
  • 博文数量: 102
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1146
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-21 22:33
文章分类

全部博文(102)

文章存档

2011年(8)

2010年(94)

我的朋友

分类:

2010-01-23 20:48:25

mmap(2) - Linux man page

这个也需要看一下,,,中间如何调用到file operations's mmap的,目前还不知道呢.

mmap(2) - Linux man page

The mmap() function asks to map length bytes starting at offset offset from the file (or other object) specified by the file descriptor fd into memory, preferably at address start. This latter address is a hint only, and is usually specified as 0. The actual place where the object is mapped is returned by mmap().

The prot argument describes the desired memory protection (and must not conflict with the open mode of the file). It is either PROT_NONE or is the bitwise OR of one or more of the other PROT_* flags.


注意需要指定fd文件指针,当是-1时,申请匿名页

fd should be a valid file descriptor, unless MAP_ANONYMOUS is set. If MAP_ANONYMOUS is set, then fd is ignored on Linux. However, some implementations require fd to be -1 ifMAP_ANONYMOUS (or MAP_ANON) is specified, and portable applications should ensure this.


关于这几个系统调用,到此暂告一段落.
接着整android init routine...
阅读(800) | 评论(0) | 转发(0) |
0

上一篇:shmem/ashmem/mmap

下一篇:Android Binder

给主人留下些什么吧!~~