diff --git a/man2/mmap.2 b/man2/mmap.2 index 4637b9845..f7e6f4fdf 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -403,6 +403,7 @@ is supported for private mappings only since Linux 2.6.23. .BR MAP_STACK " (since Linux 2.6.27)" Allocate the mapping at an address suitable for a process or thread stack. +.IP This flag is currently a no-op, but is used in the glibc threading implementation so that if some architectures require special treatment for stack allocations, @@ -412,6 +413,9 @@ support can later be transparently implemented for glibc. .\" http://thread.gmane.org/gmane.linux.kernel/720412 .\" "pthread_create() slow for many threads; also time to revisit 64b .\" context switch optimization?" +A further reason to employ this flag is portability: +.BR MAP_SHARED +exists (and has an effect) on some other systems (e.g., some of the BSDs). .TP .BR MAP_SYNC " (since Linux 4.15)" This flag is available only with the