public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/6886] New: some imperfections in description of mmap()
@ 2008-09-14 22:08 siward at wanadoo dot nl
  0 siblings, 0 replies; only message in thread
From: siward at wanadoo dot nl @ 2008-09-14 22:08 UTC (permalink / raw)
  To: glibc-bugs

Hi again, everyone,
today i have been reading manual section about mmap(),
  and some things are not completely clear to me,
  so, unless pebcak, i thought you might like to know about them :

 mmap description does not say what value of parameter length should be :
   it gives impression that it can be
   anything that is not larger than multiple of pagesize that is next higher
than size of file ;
   is this correct ?

 mmap() description does not mention what happens if writing beyond end of file,
   though i seem to remember reading somewhere that it causes a segfault ?

 mmap() description does not mention what happens if write to address that is
   beyond end of filecontent but inside mapped size ; will it segfault ?

 if a file is mmapped PROT_SHARED, and another process makes file smaller,
   will my process segfault when writing beyond new end of file ?
   is it possible to guard against this by locking file ?

 munmap description gives impression that if you do munmap it is not necessary
to use msync,
   but does not explicitly say so. is this indeed so ?

 munmap description says
   "If LENGTH is not an even number of pages, it will be rounded up."
   is this correct or should it say 'integer number of pages' ?

 munmap description says "This function is only available on a few systems.",
   but does not mention whether this includes GNU.
 also, _POSIX_MAPPED_FILES is mentioned near description of ftruncate,
   but there is no mention of whether this is defined on GNU.

 whole mmap section does not contain a link to description of enlarging mmapped
files,
   that is present in libc doc near description of ftruncate.

 Where sysconf(_SC_PAGESIZE) is shown in description of mmap(),
   i think it would be nice if it were mentioned that it is declared in unistd.h .

Thanks for reading, and have a nice day :-)
Siward

-- 
           Summary: some imperfections in description of mmap()
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: manual
        AssignedTo: roland at gnu dot org
        ReportedBy: siward at wanadoo dot nl
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6886

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-14 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-14 22:08 [Bug manual/6886] New: some imperfections in description of mmap() siward at wanadoo dot nl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).