mirror of https://github.com/mkerrisk/man-pages
Change name of 'start' argument to 'addr' for consistency with:
* other memory related interfaces * POSIX specification (for those interfaces in POSIX) * Linux and glibc source code (in at least some cases)
This commit is contained in:
parent
cd56f36fe6
commit
14f5ae6dc8
|
@ -26,13 +26,13 @@
|
||||||
.\" Modified, 25 Feb 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
|
.\" Modified, 25 Feb 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
|
||||||
.\" Added notes on MADV_DONTNEED
|
.\" Added notes on MADV_DONTNEED
|
||||||
.\"
|
.\"
|
||||||
.TH MADVISE 2 2007-07-26 "Linux" "Linux Programmer's Manual"
|
.TH MADVISE 2 2008-04-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
madvise \- give advice about use of memory
|
madvise \- give advice about use of memory
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.sp
|
.sp
|
||||||
.BI "int madvise(void *" start ", size_t " length ", int " advice );
|
.BI "int madvise(void *" addr ", size_t " length ", int " advice );
|
||||||
.sp
|
.sp
|
||||||
.in -4n
|
.in -4n
|
||||||
Feature Test Macro Requirements for glibc (see
|
Feature Test Macro Requirements for glibc (see
|
||||||
|
@ -46,7 +46,7 @@ The
|
||||||
.BR madvise ()
|
.BR madvise ()
|
||||||
system call advises the kernel about how to handle paging input/output in
|
system call advises the kernel about how to handle paging input/output in
|
||||||
the address range beginning at address
|
the address range beginning at address
|
||||||
.I start
|
.I addr
|
||||||
and with size
|
and with size
|
||||||
.I length
|
.I length
|
||||||
bytes.
|
bytes.
|
||||||
|
@ -159,7 +159,7 @@ The value
|
||||||
is negative,
|
is negative,
|
||||||
.\" .I len
|
.\" .I len
|
||||||
.\" is zero,
|
.\" is zero,
|
||||||
.I start
|
.I addr
|
||||||
is not page-aligned,
|
is not page-aligned,
|
||||||
.I advice
|
.I advice
|
||||||
is not a valid value, or the application is attempting
|
is not a valid value, or the application is attempting
|
||||||
|
@ -208,7 +208,7 @@ advice.
|
||||||
This is non-standard behavior.
|
This is non-standard behavior.
|
||||||
.LP
|
.LP
|
||||||
The Linux implementation requires that the address
|
The Linux implementation requires that the address
|
||||||
.I start
|
.I addr
|
||||||
be page-aligned, and allows
|
be page-aligned, and allows
|
||||||
.I length
|
.I length
|
||||||
to be zero.
|
to be zero.
|
||||||
|
|
14
man2/mbind.2
14
man2/mbind.2
|
@ -22,14 +22,14 @@
|
||||||
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
|
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
|
||||||
.\" more precise specification of behavior.
|
.\" more precise specification of behavior.
|
||||||
.\"
|
.\"
|
||||||
.TH MBIND 2 2007-08-27 Linux "Linux Programmer's Manual"
|
.TH MBIND 2 2008-04-22 Linux "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mbind \- Set memory policy for a memory range
|
mbind \- Set memory policy for a memory range
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B "#include <numaif.h>"
|
.B "#include <numaif.h>"
|
||||||
.sp
|
.sp
|
||||||
.BI "int mbind(void *" start ", unsigned long " len ", int " mode ,
|
.BI "int mbind(void *" addr ", unsigned long " len ", int " mode ,
|
||||||
.BI " unsigned long *" nodemask ", unsigned long " maxnode ,
|
.BI " unsigned long *" nodemask ", unsigned long " maxnode ,
|
||||||
.BI " unsigned " flags );
|
.BI " unsigned " flags );
|
||||||
.sp
|
.sp
|
||||||
|
@ -40,7 +40,7 @@ Link with \fI\-lnuma\fP
|
||||||
sets the NUMA memory policy,
|
sets the NUMA memory policy,
|
||||||
which consists of a policy mode and zero or more nodes,
|
which consists of a policy mode and zero or more nodes,
|
||||||
for the memory range starting with
|
for the memory range starting with
|
||||||
.I start
|
.I addr
|
||||||
and continuing for
|
and continuing for
|
||||||
.I len
|
.I len
|
||||||
bytes.
|
bytes.
|
||||||
|
@ -48,7 +48,7 @@ The memory of a NUMA machine is divided into multiple nodes.
|
||||||
The memory policy defines from which node memory is allocated.
|
The memory policy defines from which node memory is allocated.
|
||||||
|
|
||||||
If the memory range specified by the
|
If the memory range specified by the
|
||||||
.IR start " and " len
|
.IR addr " and " len
|
||||||
arguments includes an "anonymous" region of memory\(emthat is
|
arguments includes an "anonymous" region of memory\(emthat is
|
||||||
a region of memory created using the
|
a region of memory created using the
|
||||||
.BR mmap (2)
|
.BR mmap (2)
|
||||||
|
@ -279,11 +279,11 @@ An invalid value was specified for
|
||||||
or
|
or
|
||||||
.IR mode ;
|
.IR mode ;
|
||||||
or
|
or
|
||||||
.I start + len
|
.I addr + len
|
||||||
was less than
|
was less than
|
||||||
.IR start ;
|
.IR addr ;
|
||||||
or
|
or
|
||||||
.I start
|
.I addr
|
||||||
is not a multiple of the system page size.
|
is not a multiple of the system page size.
|
||||||
Or,
|
Or,
|
||||||
.I mode
|
.I mode
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
.\" after message from <gordon.jin@intel.com>
|
.\" after message from <gordon.jin@intel.com>
|
||||||
.\" 2007-01-08 mtk, rewrote various parts
|
.\" 2007-01-08 mtk, rewrote various parts
|
||||||
.\"
|
.\"
|
||||||
.TH MINCORE 2 2007-07-26 "Linux" "Linux Programmer's Manual"
|
.TH MINCORE 2 2008-04-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mincore \- determine whether pages are resident in memory
|
mincore \- determine whether pages are resident in memory
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -39,7 +39,7 @@ mincore \- determine whether pages are resident in memory
|
||||||
.br
|
.br
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.sp
|
.sp
|
||||||
.BI "int mincore(void *" start ", size_t " length ", unsigned char *" vec );
|
.BI "int mincore(void *" addr ", size_t " length ", unsigned char *" vec );
|
||||||
.sp
|
.sp
|
||||||
.in -4n
|
.in -4n
|
||||||
Feature Test Macro Requirements for glibc (see
|
Feature Test Macro Requirements for glibc (see
|
||||||
|
@ -55,13 +55,13 @@ of the calling process's virtual memory are resident in core (RAM),
|
||||||
and so will not cause a disk access (page fault) if referenced.
|
and so will not cause a disk access (page fault) if referenced.
|
||||||
The kernel returns residency information about the pages
|
The kernel returns residency information about the pages
|
||||||
starting at the address
|
starting at the address
|
||||||
.IR start ,
|
.IR addr ,
|
||||||
and continuing for
|
and continuing for
|
||||||
.I length
|
.I length
|
||||||
bytes.
|
bytes.
|
||||||
|
|
||||||
The
|
The
|
||||||
.I start
|
.I addr
|
||||||
argument must be a multiple of the system page size.
|
argument must be a multiple of the system page size.
|
||||||
The
|
The
|
||||||
.I length
|
.I length
|
||||||
|
@ -107,13 +107,13 @@ kernel is temporarily out of resources.
|
||||||
points to an invalid address.
|
points to an invalid address.
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
.I start
|
.I addr
|
||||||
is not a multiple of the page size.
|
is not a multiple of the page size.
|
||||||
.TP
|
.TP
|
||||||
.B ENOMEM
|
.B ENOMEM
|
||||||
.I length
|
.I length
|
||||||
is greater than
|
is greater than
|
||||||
.RI ( TASK_SIZE " \- " start ).
|
.RI ( TASK_SIZE " \- " addr ).
|
||||||
(This could occur if a negative value is specified for
|
(This could occur if a negative value is specified for
|
||||||
.IR length ,
|
.IR length ,
|
||||||
since that value will be interpreted as a large
|
since that value will be interpreted as a large
|
||||||
|
@ -123,9 +123,9 @@ In Linux 2.6.11 and earlier, the error
|
||||||
was returned for this condition.
|
was returned for this condition.
|
||||||
.TP
|
.TP
|
||||||
.B ENOMEM
|
.B ENOMEM
|
||||||
.I start
|
.I addr
|
||||||
to
|
to
|
||||||
.I start
|
.I addr
|
||||||
+
|
+
|
||||||
.I length
|
.I length
|
||||||
contained unmapped memory.
|
contained unmapped memory.
|
||||||
|
|
24
man2/mmap.2
24
man2/mmap.2
|
@ -36,35 +36,35 @@
|
||||||
.\" Modified 2006-12-04, mtk, various parts rewritten
|
.\" Modified 2006-12-04, mtk, various parts rewritten
|
||||||
.\" 2007-07-10, mtk, Added an example program.
|
.\" 2007-07-10, mtk, Added an example program.
|
||||||
.\"
|
.\"
|
||||||
.TH MMAP 2 2007-11-25 "Linux" "Linux Programmer's Manual"
|
.TH MMAP 2 2008-04-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mmap, munmap \- map or unmap files or devices into memory
|
mmap, munmap \- map or unmap files or devices into memory
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.sp
|
.sp
|
||||||
.BI "void *mmap(void *" start ", size_t " length \
|
.BI "void *mmap(void *" addr ", size_t " length \
|
||||||
", int " prot ", int " flags ,
|
", int " prot ", int " flags ,
|
||||||
.BI " int " fd ", off_t " offset );
|
.BI " int " fd ", off_t " offset );
|
||||||
.BI "int munmap(void *" start ", size_t " length );
|
.BI "int munmap(void *" addr ", size_t " length );
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR mmap ()
|
.BR mmap ()
|
||||||
creates a new mapping in the virtual address space of
|
creates a new mapping in the virtual address space of
|
||||||
the calling process.
|
the calling process.
|
||||||
The starting address for the new mapping is specified in
|
The starting address for the new mapping is specified in
|
||||||
.IR start .
|
.IR addr .
|
||||||
The
|
The
|
||||||
.I length
|
.I length
|
||||||
argument specifies the length of the mapping.
|
argument specifies the length of the mapping.
|
||||||
|
|
||||||
If
|
If
|
||||||
.I start
|
.I addr
|
||||||
is NULL,
|
is NULL,
|
||||||
then the kernel chooses the address at which to create the mapping;
|
then the kernel chooses the address at which to create the mapping;
|
||||||
this is the most portable method of creating a new mapping.
|
this is the most portable method of creating a new mapping.
|
||||||
If
|
If
|
||||||
.I start
|
.I addr
|
||||||
is not NULL,
|
is not NULL,
|
||||||
then the kernel takes it as a hint about where to place the mapping;
|
then the kernel takes it as a hint about where to place the mapping;
|
||||||
on Linux, the mapping will be created at the next higher page boundary.
|
on Linux, the mapping will be created at the next higher page boundary.
|
||||||
|
@ -193,12 +193,12 @@ Ignored.
|
||||||
.TP
|
.TP
|
||||||
.B MAP_FIXED
|
.B MAP_FIXED
|
||||||
Don't interpret
|
Don't interpret
|
||||||
.I start
|
.I addr
|
||||||
as a hint: place the mapping at exactly that address.
|
as a hint: place the mapping at exactly that address.
|
||||||
.I start
|
.I addr
|
||||||
must be a multiple of the page size.
|
must be a multiple of the page size.
|
||||||
If the memory region specified by
|
If the memory region specified by
|
||||||
.I start
|
.I addr
|
||||||
and
|
and
|
||||||
.I len
|
.I len
|
||||||
overlaps pages of any existing mapping(s), then the overlapped
|
overlaps pages of any existing mapping(s), then the overlapped
|
||||||
|
@ -287,7 +287,7 @@ On the other hand, closing the file
|
||||||
descriptor does not unmap the region.
|
descriptor does not unmap the region.
|
||||||
.LP
|
.LP
|
||||||
The address
|
The address
|
||||||
.I start
|
.I addr
|
||||||
must be a multiple of the page size.
|
must be a multiple of the page size.
|
||||||
All pages containing a part
|
All pages containing a part
|
||||||
of the indicated range are unmapped, and subsequent references
|
of the indicated range are unmapped, and subsequent references
|
||||||
|
@ -370,7 +370,7 @@ was not set).
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
We don't like
|
We don't like
|
||||||
.IR start ,
|
.IR addr ,
|
||||||
.IR length ,
|
.IR length ,
|
||||||
or
|
or
|
||||||
.I offset
|
.I offset
|
||||||
|
@ -491,7 +491,7 @@ is 0.
|
||||||
However, in kernels before 2.6.12,
|
However, in kernels before 2.6.12,
|
||||||
.BR mmap ()
|
.BR mmap ()
|
||||||
succeeded in this case: no mapping was created and the call returned
|
succeeded in this case: no mapping was created and the call returned
|
||||||
.IR start .
|
.IR addr .
|
||||||
Since kernel 2.6.12,
|
Since kernel 2.6.12,
|
||||||
.BR mmap ()
|
.BR mmap ()
|
||||||
fails with the error
|
fails with the error
|
||||||
|
|
|
@ -26,14 +26,14 @@
|
||||||
.\" Added description of mmap2
|
.\" Added description of mmap2
|
||||||
.\" Modified, 2004-11-25, mtk -- removed stray #endif in prototype
|
.\" Modified, 2004-11-25, mtk -- removed stray #endif in prototype
|
||||||
.\"
|
.\"
|
||||||
.TH MMAP2 2 2007-07-08 "Linux" "Linux Programmer's Manual"
|
.TH MMAP2 2 2008-04-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
mmap2 \- map files or devices into memory
|
mmap2 \- map files or devices into memory
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.sp
|
.sp
|
||||||
.BI "void *mmap2(void *" start ", size_t " length ", int " prot ,
|
.BI "void *mmap2(void *" addr ", size_t " length ", int " prot ,
|
||||||
.BI " int " flags ", int " fd ", off_t " pgoffset );
|
.BI " int " flags ", int " fd ", off_t " pgoffset );
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
|
@ -22,13 +22,13 @@
|
||||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||||
.\" the source, must acknowledge the copyright and authors of this work.
|
.\" the source, must acknowledge the copyright and authors of this work.
|
||||||
.\"
|
.\"
|
||||||
.TH MSYNC 2 2003-08-21 "Linux" "Linux Programmer's Manual"
|
.TH MSYNC 2 2008-04-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
msync \- synchronize a file with a memory map
|
msync \- synchronize a file with a memory map
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.sp
|
.sp
|
||||||
.BI "int msync(void *" start ", size_t " length ", int " flags );
|
.BI "int msync(void *" addr ", size_t " length ", int " flags );
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.BR msync ()
|
.BR msync ()
|
||||||
flushes changes made to the in-core copy of a file that was mapped
|
flushes changes made to the in-core copy of a file that was mapped
|
||||||
|
@ -41,7 +41,7 @@ there is no guarantee that changes are written back before
|
||||||
is called.
|
is called.
|
||||||
To be more precise, the part of the file that
|
To be more precise, the part of the file that
|
||||||
corresponds to the memory area starting at
|
corresponds to the memory area starting at
|
||||||
.I start
|
.I addr
|
||||||
and having length
|
and having length
|
||||||
.I length
|
.I length
|
||||||
is updated.
|
is updated.
|
||||||
|
@ -79,7 +79,7 @@ was specified in
|
||||||
and a memory lock exists for the specified address range.
|
and a memory lock exists for the specified address range.
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
.I start
|
.I addr
|
||||||
is not a multiple of PAGESIZE; or any bit other than
|
is not a multiple of PAGESIZE; or any bit other than
|
||||||
.BR MS_ASYNC " | " MS_INVALIDATE " | " MS_SYNC
|
.BR MS_ASYNC " | " MS_INVALIDATE " | " MS_SYNC
|
||||||
is set in
|
is set in
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
.\" 2003-12-10 Initial creation, Michael Kerrisk <mtk.manpages@gmail.com>
|
.\" 2003-12-10 Initial creation, Michael Kerrisk <mtk.manpages@gmail.com>
|
||||||
.\" 2004-10-28 aeb, corrected prototype, prot must be 0
|
.\" 2004-10-28 aeb, corrected prototype, prot must be 0
|
||||||
.\"
|
.\"
|
||||||
.TH REMAP_FILE_PAGES 2 2004-10-28 "Linux" "Linux Programmer's Manual"
|
.TH REMAP_FILE_PAGES 2 2008-04-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
remap_file_pages \- create a non-linear file mapping
|
remap_file_pages \- create a non-linear file mapping
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -31,7 +31,7 @@ remap_file_pages \- create a non-linear file mapping
|
||||||
.B #define _GNU_SOURCE
|
.B #define _GNU_SOURCE
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.sp
|
.sp
|
||||||
.BI "int remap_file_pages(void *" start ", size_t " size ", int " prot ,
|
.BI "int remap_file_pages(void *" addr ", size_t " size ", int " prot ,
|
||||||
.BI " ssize_t " pgoff ", int " flags );
|
.BI " ssize_t " pgoff ", int " flags );
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@ -77,16 +77,16 @@ is a file offset in units of the system page size;
|
||||||
is the length of the region in bytes.
|
is the length of the region in bytes.
|
||||||
|
|
||||||
The
|
The
|
||||||
.I start
|
.I addr
|
||||||
argument serves two purposes.
|
argument serves two purposes.
|
||||||
First, it identifies the mapping whose pages we want to rearrange.
|
First, it identifies the mapping whose pages we want to rearrange.
|
||||||
Thus,
|
Thus,
|
||||||
.I start
|
.I addr
|
||||||
must be an address that falls within
|
must be an address that falls within
|
||||||
a region previously mapped by a call to
|
a region previously mapped by a call to
|
||||||
.BR mmap (2).
|
.BR mmap (2).
|
||||||
Second,
|
Second,
|
||||||
.I start
|
.I addr
|
||||||
specifies the address at which the file pages
|
specifies the address at which the file pages
|
||||||
identified by
|
identified by
|
||||||
.I pgoff
|
.I pgoff
|
||||||
|
@ -95,7 +95,7 @@ and
|
||||||
will be placed.
|
will be placed.
|
||||||
|
|
||||||
The values specified in
|
The values specified in
|
||||||
.I start
|
.I addr
|
||||||
and
|
and
|
||||||
.I size
|
.I size
|
||||||
should be multiples of the system page size.
|
should be multiples of the system page size.
|
||||||
|
@ -129,14 +129,14 @@ is set appropriately.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
.I start
|
.I addr
|
||||||
does not refer to a valid mapping
|
does not refer to a valid mapping
|
||||||
created with the
|
created with the
|
||||||
.B MAP_SHARED
|
.B MAP_SHARED
|
||||||
flag.
|
flag.
|
||||||
.TP
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
.IR start ,
|
.IR addr ,
|
||||||
.IR size ,
|
.IR size ,
|
||||||
.IR prot ,
|
.IR prot ,
|
||||||
or
|
or
|
||||||
|
|
Loading…
Reference in New Issue