1mmap_read(3)               Library Functions Manual               mmap_read(3)
2
3
4

NAME

6       mmap_read - memory map a file for reading
7

SYNTAX

9       #include <mmap.h>
10
11       char* mmap_read(const char* filename,size_t* filesize);
12

DESCRIPTION

14       mmap_read  opens filename for reading, maps the whole file into memory,
15       closes the file, writes the length of the file to filesize and  returns
16       a pointer to the mapped file.
17
18       The file is unmapped by the operating system if the process terminates.
19       It can also be manually unmapped by calling munmap from <sys/mman.h>.
20
21       If the file could not be opened or mapped, (void*)0 is returned.
22

SEE ALSO

24       munmap(2)
25
26
27
28                                                                  mmap_read(3)
Impressum