diff --git a/man2/mmap.2 b/man2/mmap.2 index bf7f449e1..503df4caf 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -261,8 +261,19 @@ can be discovered by listing the subdirectories in .IR /sys/kernel/mm/hugepages . .TP .BR MAP_LOCKED " (since Linux 2.5.37)" -Lock the pages of the mapped region into memory in the manner of +Mark the mmaped region to be locked in the same way as .BR mlock (2). +This implementation will try to populate (prefault) the whole range but +the mmap call doesn't fail with +.B ENOMEM +if this fails. Therefore major faults might happen later on. So the semantic +is not as strong as +.BR mlock (2). +.BR mmap (2) ++ +.BR mlock (2) +should be used when major faults are not acceptable after the initialization +of the mapping. This flag is ignored in older kernels. .\" If set, the mapped pages will not be swapped out. .TP