23 #ifndef INCLUDED_WMMAN 24 #define INCLUDED_WMMAN 31 #define PROT_NONE 0x00 32 #define PROT_READ 0x01 33 #define PROT_WRITE 0x02 34 #define PROT_EXEC 0x04 37 #define MAP_SHARED 0x01 // writes change the underlying file 38 #define MAP_PRIVATE 0x02 // writes do not affect the file (copy-on-write) 39 #define MAP_FIXED 0x04 41 #define MAP_ANONYMOUS 0x10 // backed by the pagefile; fd should be -1 42 #define MAP_NORESERVE 0x20 // see below 52 #define MAP_FAILED ((void*)intptr_t(-1)) 54 extern void*
mmap(
void* start,
size_t len,
int prot,
int flags,
int fd,
off_t offset);
55 extern int munmap(
void* start,
size_t len);
57 extern int mprotect(
void* addr,
size_t len,
int prot);
62 #endif // #ifndef INCLUDED_WMMAN __int64 off_t
Definition: wposix_types.h:91
LIB_API unsigned MemoryProtectionFromPosix(int prot)
Definition: wmman.cpp:30
int mprotect(void *addr, size_t len, int prot)
Definition: wmman.cpp:67
int munmap(void *start, size_t len)
Definition: wmman.cpp:222
void * mmap(void *start, size_t len, int prot, int flags, int fd, off_t offset)
Definition: wmman.cpp:202