开发者

Where is MAP_FAILED returned

A linux kernel newbie question.

the man pag开发者_开发问答es of mmap state that ".. otherwise, it shall return a value of MAP_FAILED and set errno to indicate the error... "

I have looked through the kernel code for mmap under /usr/src/linux/mm/mmap.c but I could not find a place where mmap returns MAP_FAILED.

Can anyone point me as to where can I find the same.

Thanks


You won't find MAP_FAILED in the kernel; instead, it's defined in userspace and used by mmap, the userspace function that wraps the system call. See the glibc source for mmap.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜