mmap.2: ffix

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-12-18 17:57:51 +01:00
parent e2da344f74
commit b9f34840c2
1 changed files with 14 additions and 7 deletions

View File

@ -238,19 +238,26 @@ For example, thread A looks through
and locates an available address range,
while thread B simultaneously acquires part or all of that same
address range.
A then calls mmap(MAP_FIXED), effectively overwriting
the mapping that thread B created.
A then calls
.BR mmap(MAP_FIXED) ,
effectively overwriting the mapping that thread B created.
.IP
Thread B need not create a mapping directly; simply making a library call
that, internally, uses
.I dlopen(3)
.BR dlopen (3)
to load some other shared library, will
suffice.
The dlopen(3) call will map the library into the process's address
space.
The
.BR dlopen (3)
call will map the library into the process's address space.
Furthermore, almost any library call may be implemented using this technique.
Examples include brk(2), malloc(3), pthread_create(3), and the PAM libraries
(http://www.linux-pam.org).
Examples include
.BR brk (2),
.BR malloc (3),
.BR pthread_create (3),
and the PAM libraries
.UR http://www.linux-pam.org
.UE .
.IP
Newer kernels
(Linux 4.16 and later) have a