mprotect.2: Note ENOMEM error that can occur when we reach limit on maximum VMAs

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-07-22 09:18:26 +02:00
parent c0b897882c
commit 4607213d6b
1 changed files with 12 additions and 0 deletions

View File

@ -109,6 +109,18 @@ or specify one or more pages that are not mapped.
(Before kernel 2.4.19, the error
.BR EFAULT
was incorrectly produced for these cases.)
.TP
.B ENOMEM
Changing the protection of a memory region would result in the total number of
mappings with distinct attributes (e.g., read versus read/write protection)
exceeding the allowed maximum.
.\" I.e., the number of VMAs would exceed the 64kB maximum
(For example, making the protection of a range
.BR PROT_READ
in the middle of a region currently protected as
.BR PROT_READ|PROT_WRITE
would result in three mappings:
two read/write mappings at each end and a read-only mapping in the middle.)
.SH CONFORMING TO
SVr4, POSIX.1-2001.
.\" SVr4 defines an additional error