Print this page
12010 extra whitespace in mmap(2)
@@ -43,25 +43,24 @@
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2013 OmniTI Computer Consulting, Inc. All Rights Reserved.
.\" Copyright 2016 James S Blachly, MD. All Rights Reserved.
+.\" Copyright 2019 Joyent, Inc.
.\"
-.TH MMAP 2 "August 29, 2016"
+.TH MMAP 2 "Nov 19, 2019"
.SH NAME
mmap \- map pages of memory
.SH SYNOPSIS
-.LP
.nf
#include <sys/mman.h>
\fBvoid *\fR\fBmmap\fR(\fBvoid *\fR\fIaddr\fR, \fBsize_t\fR \fIlen\fR, \fBint\fR \fIprot\fR, \fBint\fR \fIflags\fR,
\fBint\fR \fIfildes\fR, \fBoff_t\fR \fIoff\fR);
.fi
.SH DESCRIPTION
-.LP
The \fBmmap()\fR function establishes a mapping between a process's address
space and a file or shared memory object. The format of the call is as follows:
.sp
.LP
\fIpa\fR = \fBmmap(\fR\fIaddr\fR\fB, \fR\fIlen\fR\fB, \fR\fIprot\fR\fB,
@@ -710,11 +709,10 @@
.RS 4n
4-Mbyte delta between starting addresses
.RE
.SH RETURN VALUES
-.LP
Upon successful completion, the \fBmmap()\fR function returns the address at
which the mapping was placed (\fIpa\fR); otherwise, it returns a value of
\fBMAP_FAILED\fR and sets \fBerrno\fR to indicate the error. The symbol
\fBMAP_FAILED\fR is defined in the header <\fBsys/mman.h\fR>. No successful
return from \fBmmap()\fR will return the value \fBMAP_FAILED\fR.
@@ -722,11 +720,10 @@
.LP
If \fBmmap()\fR fails for reasons other than \fBEBADF\fR, \fBEINVAL\fR or
\fBENOTSUP\fR, some of the mappings in the address range starting at \fIaddr\fR
and continuing for \fIlen\fR bytes may have been unmapped.
.SH ERRORS
-.LP
The \fBmmap()\fR function will fail if:
.sp
.ne 2
.na
\fB\fBEACCES\fR\fR
@@ -870,11 +867,10 @@
The file to be mapped is already locked using advisory or mandatory record
locking. See \fBfcntl\fR(2).
.RE
.SH USAGE
-.LP
Use of \fBmmap()\fR may reduce the amount of memory available to other memory
allocation functions.
.sp
.LP
\fBMAP_ALIGN\fR is useful to assure a properly aligned value of \fIpa\fR for
@@ -927,11 +923,10 @@
/* use data at address */
.fi
.in -2
.SH ATTRIBUTES
-.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
@@ -944,11 +939,10 @@
_
MT-Level Async-Signal-Safe
.TE
.SH SEE ALSO
-.LP
\fBclose\fR(2), \fBexec\fR(2), \fBfcntl\fR(2), \fBfork\fR(2),
\fBgetrlimit\fR(2), \fBmemcntl\fR(2), \fBmmapobj\fR(2), \fBmprotect\fR(2),
\fBmunmap\fR(2), \fBshmat\fR(2), \fBlockf\fR(3C), \fBmlockall\fR(3C),
\fBmsync\fR(3C), \fBplock\fR(3C), \fBsysconf\fR(3C), \fBattributes\fR(5),
\fBlf64\fR(5), \fBstandards\fR(5), \fBnull\fR(7D), \fBzero\fR(7D)