When mremap() is used to move or expand a mapping that is locked with mlock() or equivalent it will attempt to populate the new area. However, like mmap(MAP_LOCKED), mremap() will not fail if the area cannot be populated. Also like mmap(MAP_LOCKED) this might come as a surprise to users and should be noted. Signed-off-by: Eric B Munson <emunson@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: linux-man@xxxxxxxxxxxxxxx Cc: linux-mm@xxxxxxxxx Cc: linux-kernel@xxxxxxxxxxxxxxx --- man2/mremap.2 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/man2/mremap.2 b/man2/mremap.2 index 071adb5..cf884e6 100644 --- a/man2/mremap.2 +++ b/man2/mremap.2 @@ -196,6 +196,17 @@ and the prototype for did not allow for the .I new_address argument. + +If +.BR mremap () +is used to move or expand an area locked with +.BR mlock (2) +or equivalent, the +.BR mremap () +call will make a best effort to populate the new area but will not fail +with +.B ENOMEM +if the area cannot be populated. .SH SEE ALSO .BR brk (2), .BR getpagesize (2), -- 1.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>