]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
mlock.2: Document another ENOME error case
authorMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 21 Jul 2015 18:47:17 +0000 (20:47 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Tue, 21 Jul 2015 18:47:17 +0000 (20:47 +0200)
ENOMEM can occur if locking/unlocking in the middle of a region
would increase the number of VMAs beyond the system limit (64k).

Reported-by: Mehdi Aqadjani Memar <m.aqadjanimemar@student.vu.nl>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/mlock.2

index b8487ff290810ba9659d330518a88fb692d09443..8f483729035f07b32b417f5f76b61b74d3376108 100644 (file)
@@ -170,6 +170,15 @@ was not a multiple of the page size.
 .B ENOMEM
 Some of the specified address range does not correspond to mapped
 pages in the address space of the process.
+.TP
+.B ENOMEM
+Locking or unlocking a region would result in the total number of
+mappings with distinct attributes (e.g., locked versus unlocked)
+exceeding the allowed maximum.
+.\" I.e., the number of VMAs would exceed the 64kB maximum
+(For example, unlocking a range in the middle of a currently locked
+mapping would result in three mappings:
+two locked mappings at each end and an unlocked mapping in the middle.)
 .LP
 For
 .BR mlockall ():