pcsxr-1.9.92
[pcsx_rearmed.git] / win32 / glue / sys / mman.h
1 //\r
2 // Copyright (c) 2008, Wei Mingzhi. All rights reserved.\r
3 //\r
4 // Use, redistribution and modification of this code is unrestricted\r
5 // as long as this notice is preserved.\r
6 //\r
7 // This code is provided with ABSOLUTELY NO WARRANTY.\r
8 //\r
9 \r
10 #ifndef MMAN_H\r
11 #define MMAN_H\r
12 \r
13 #include <windows.h>\r
14 \r
15 #define mmap(start, length, prot, flags, fd, offset) \\r
16         ((unsigned char *)VirtualAlloc(NULL, (length), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE))\r
17 \r
18 #define munmap(start, length) do { VirtualFree((start), (length), MEM_RELEASE); } while (0)\r
19 \r
20 #endif\r