Added note on Linux's old (pre-2.6.12) buggy treatment of length==0.

This commit is contained in:
Michael Kerrisk 2006-09-05 12:24:48 +00:00
parent 835c4d5ce4
commit c8f3e58070
1 changed files with 15 additions and 0 deletions

View File

@ -415,6 +415,21 @@ flag only has effect if
.I prot
is specified as
.BR PROT_NONE .
SUSv3 specifies that
.BR mmap ()
should fail if
.I length
is 0.
However, in kernels before 2.6.12,
.BR mmap ()
succeeded in this case: no mapping was created and the call returned
.IR start .
Since kernel 2.6.12,
.BR mmap ()
fails with the error
.B EINVAL
for this case.
.SH "SEE ALSO"
.BR getpagesize (2),
.BR mincore (2),