CWB
|
This file provides an equivalent of the POSIX mmap() function for use in Windows; the Windows API lacks this function. More...
#include "windows-mmap.h"
This file provides an equivalent of the POSIX mmap() function for use in Windows; the Windows API lacks this function.
The code was adapted from the Git project (note that Git is GPL-licensed).
Very important note: this file should only be compiled and linked when targeting a windows environment.
void* mmap | ( | void * | start, |
size_t | length, | ||
int | prot, | ||
int | flags, | ||
int | fd, | ||
off_t | offset | ||
) |
Substitute POSIX mmap() for use in Windows.
It wraps the Windows API functions CreateFileMapping() and MapViewOfFileEx().
The arguments, return, etc. are the same as POSIX mmap(), which is documented much more thoroughly than we could hope to do here.
References MAP_FAILED, and MAP_PRIVATE.
Referenced by mmapfile().