diff --git a/man2/madvise.2 b/man2/madvise.2 index 638851ba4..dbe1deca1 100644 --- a/man2/madvise.2 +++ b/man2/madvise.2 @@ -146,6 +146,7 @@ error .\" bufferpool (shared memory segments) - without writing back to .\" disk/swap space. This feature is also useful for supporting .\" hot-plug memory on UML. +The specified address range must be mapped shared and writable. This flag cannot be applied to locked pages or Huge TLB pages. .TP .BR MADV_DONTFORK " (since Linux 2.6.16)" @@ -324,6 +325,12 @@ On error, it returns \-1 and is set appropriately. .SH ERRORS .TP +.B EACCES +.I advice +is +.BR MADV_REMOVE , +but the specified address range is not a shared writable mapping. +.TP .B EAGAIN A kernel resource was temporarily unavailable. .TP