mirror of https://github.com/mkerrisk/man-pages
Clarified the description of MREMAP_FIXED and restructured
the text to reflect the fact that this flag is exposed by glibc since version 2.4.
This commit is contained in:
parent
b6c4058719
commit
8107e4b78d
|
@ -78,6 +78,28 @@ If the mapping is relocated,
|
|||
then absolute pointers into the old mapping location
|
||||
become invalid (offsets relative to the starting address of
|
||||
the mapping should be employed).
|
||||
.TP
|
||||
.BR MREMAP_FIXED " (since Linux 2.3.31)"
|
||||
This flag serves a similar purpose to the
|
||||
.B MAP_FIXED
|
||||
flag of
|
||||
.BR mmap (2).
|
||||
If this flag is specified, then
|
||||
.BR mremap ()
|
||||
accepts a fifth argument,
|
||||
.IR "void *new_address" ,
|
||||
which specifies a page-aligned address to which the mapping must
|
||||
be moved.
|
||||
Any previous mapping at the address range specified by
|
||||
.I new_address
|
||||
and
|
||||
.I new_size
|
||||
is unmapped.
|
||||
If
|
||||
.B MREMAP_FIXED
|
||||
is specified, then
|
||||
.BR MREMAP_MAYMOVE
|
||||
must also be specified.
|
||||
.PP
|
||||
If the memory segment specified by
|
||||
.I old_address
|
||||
|
@ -141,37 +163,13 @@ The memory area cannot be expanded at the current virtual address, and the
|
|||
flag is not set in \fIflags\fP.
|
||||
Or, there is not enough (virtual) memory available.
|
||||
.SH NOTES
|
||||
Linux 2.3.31 added an additional
|
||||
.I flags
|
||||
value:
|
||||
Prior to version 2.4, glibc did not expose the definition of
|
||||
.BR MREMAP_FIXED ,
|
||||
with a similar purpose to the
|
||||
.B MAP_FIXED
|
||||
flag for
|
||||
.BR mmap (2).
|
||||
If this flag is specified, then
|
||||
and the prototype for
|
||||
.BR mremap ()
|
||||
accepts a fifth argument,
|
||||
.IR new_address ,
|
||||
which specifies a fixed address to which the mapping should be moved.
|
||||
This address must be page aligned.
|
||||
If
|
||||
.B MREMAP_FIXED
|
||||
is specified, then
|
||||
.BR MREMAP_MAYMOVE
|
||||
must also be specified.
|
||||
Currently, neither the definition of
|
||||
.B MREMAP_FIXED
|
||||
nor a prototype for the
|
||||
did not allow for the
|
||||
.I new_address
|
||||
argument are exposed by glibc.
|
||||
.\" FIXME (Oct 05)
|
||||
.\" But check http://sourceware.org/bugzilla/show_bug.cgi?id=1458
|
||||
.\" to see whether glibc has been fixed to expose MREMAP_FIXED
|
||||
.\" and the 'new_address' argument.
|
||||
.\" According to the bug reply, on 14 Oct 05 Ulrich Drepper
|
||||
.\" made the necessary changes in the glibc CVS.
|
||||
.\" Changes aren't in glibc 2.3.6, perhaps 2.4?
|
||||
argument.
|
||||
.SH "CONFORMING TO"
|
||||
This call is Linux-specific, and should not be used in programs
|
||||
intended to be portable. 4.2BSD had a (never actually implemented)
|
||||
|
|
Loading…
Reference in New Issue