summaryrefslogtreecommitdiff
path: root/win32/glue/sys/mman.h
diff options
context:
space:
mode:
Diffstat (limited to 'win32/glue/sys/mman.h')
-rw-r--r--win32/glue/sys/mman.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/glue/sys/mman.h b/win32/glue/sys/mman.h
index a803408a..35e8cd24 100644
--- a/win32/glue/sys/mman.h
+++ b/win32/glue/sys/mman.h
@@ -13,8 +13,8 @@
#include <stdlib.h>
#define mmap(start, length, prot, flags, fd, offset) \
- ((unsigned char *)malloc(length))
+ ((unsigned char *)VirtualAlloc(NULL, (length), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE))
-#define munmap(start, length) do { free(start); } while (0)
+#define munmap(start, length) do { VirtualFree((start), (length), MEM_RELEASE); } while (0)
#endif