munmap.2: Add STANDARDS and note about portability

POSIX used to specify that munmap shall fail with EINVAL if the addr
argument is not a multiple of the page size, but that was changed to
may fail.  Note that we conform to contemporary POSIX and include a
brief note for portable programs.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48481
This commit is contained in:
Ed Maste 2025-01-15 16:43:49 -05:00
parent 6f27755482
commit 724e383bd4

View file

@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.Dd January 15, 2025
.Dd January 16, 2025
.Dt MUNMAP 2
.Os
.Sh NAME
@ -66,6 +66,15 @@ valid address range for a process.
.Xr mprotect 2 ,
.Xr msync 2 ,
.Xr getpagesize 3
.Sh STANDARDS
The
.Fn munmap
system call conforms to
.St -p1003.1-2024 .
Portable programs should ensure that
.Fa addr
is a multiple of the page size as returned by
.Xr sysconf 3 .
.Sh HISTORY
The
.Fn munmap