2 // Copyright (c) 2008, Wei Mingzhi. All rights reserved.
\r
4 // Use, redistribution and modification of this code is unrestricted
\r
5 // as long as this notice is preserved.
\r
7 // This code is provided with ABSOLUTELY NO WARRANTY.
\r
13 #include <windows.h>
\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
18 #define munmap(start, length) do { VirtualFree((start), (length), MEM_RELEASE); } while (0)
\r