CWB
|
#include <windows.h>
#include <sys/stat.h>
#include <stdint.h>
#include <stdio.h>
#include <io.h>
#define MAP_FAILED ((void*)-1) |
Referenced by mmap(), and mmapfile().
#define MAP_PRIVATE 0x02 |
Referenced by mmap().
#define MAP_SHARED 0x01 |
Referenced by mmapfile().
#define PROT_READ 1 |
Referenced by mmapfile().
#define PROT_WRITE 2 |
Referenced by mmapfile().
typedef char* caddr_t |
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().