Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
698 B

  1. .TH mmap_private 3
  2. .SH NAME
  3. mmap_private \- memory map a file for reading and writing
  4. .SH SYNTAX
  5. .B #include <mmap.h>
  6. extern char* \fBmmap_private\fP(const char* \fIfilename\fR,unsigned long* \fIfilesize\fR);
  7. .SH DESCRIPTION
  8. mmap_private opens \fIfilename\fR for reading and writing, maps the
  9. whole file into memory, closes the file, writes the length of the file
  10. to \fIfilesize\fR and returns a pointer to the mapped file.
  11. The file is mapped copy-on-write. Changes done to the mapped region
  12. will not be written to disk.
  13. The file is unmapped by the operating system if the process terminates.
  14. It can also be manually unmapped by calling \fBmunmap\fR from
  15. <sys/mman.h>.
  16. .SH "SEE ALSO"
  17. munmap(2)