diff --git a/man2/mmap.2 b/man2/mmap.2 index 1ea5f1528..54ac041a1 100644 --- a/man2/mmap.2 +++ b/man2/mmap.2 @@ -612,14 +612,21 @@ fails with the error .B EINVAL for this case. -POSIX specifies that system shall always zero fill any partial page at the end -of the object and that system will newer write any modification of object -beyond its end. On Linux when you write data to such partial page after the end -of the object the data stays in page cache even after you closed and unmaped -the file and although the data are newer written to the file itself subsequent -mappings may see the modified content. In some cases this could be fixed by -calling msync before the unmap takes place, this however doesn't work on tmpfs -(for example when using shm ipc interface). +POSIX specifies that the system shall always +zero fill any partial page at the end +of the object and that system will never write any modification of the +object beyond its end. +On Linux, when you write data to such partial page after the end +of the object, the data stays in the page cache even after the file +is closed and unmapped +and even though the data is never written to the file itself, +subsequent mappings may see the modified content. +In some cases, this could be fixed by calling +.BR msync (2) +before the unmap takes place; +however, this doesn't work on tmpfs +(for example, when using POSIX shared memory interface documented in +.BR shm_overview (7)). .SH EXAMPLE .\" FIXME . Add an example here that uses an anonymous shared region for .\" IPC between parent and child.