2001-05-12 03:34:27 +00:00
|
|
|
#ifndef MMAP_H
|
|
|
|
#define MMAP_H
|
|
|
|
|
|
|
|
/* open file for reading, mmap whole file, close file, write length of
|
|
|
|
* map in filesize and return pointer to map. */
|
2001-10-15 12:17:50 +00:00
|
|
|
extern char* mmap_read(const char *filename,unsigned long* filesize);
|
2001-05-12 03:34:27 +00:00
|
|
|
|
|
|
|
/* open file for writing, mmap whole file privately (copy on write),
|
|
|
|
* close file, write length of map in filesize and return pointer to
|
|
|
|
* map. */
|
2002-11-12 20:15:11 +00:00
|
|
|
extern char* mmap_private(const char *filename,unsigned long* filesize);
|
2001-05-12 03:34:27 +00:00
|
|
|
|
|
|
|
/* open file for writing, mmap whole file shared, close file, write
|
|
|
|
* length of map in filesize and return pointer to map. */
|
2001-10-15 14:34:02 +00:00
|
|
|
extern char* mmap_shared(const char *filename,unsigned long* filesize);
|
2001-05-12 03:34:27 +00:00
|
|
|
|
|
|
|
#endif
|