[MLton-commit] r4177

Stephen Weeks MLton@mlton.org
Tue, 8 Nov 2005 14:58:47 -0800


Use "0" instead of "start" as the first argument to VirtualAlloc
because it is more stable on MinGW.

----------------------------------------------------------------------

U   mlton/trunk/runtime/platform/windows.c

----------------------------------------------------------------------

Modified: mlton/trunk/runtime/platform/windows.c
===================================================================
--- mlton/trunk/runtime/platform/windows.c	2005-11-08 22:48:34 UTC (rev 4176)
+++ mlton/trunk/runtime/platform/windows.c	2005-11-08 22:58:45 UTC (rev 4177)
@@ -110,7 +110,10 @@
 static inline void *Windows_mmapAnon (void *start, size_t length) {
         void *res;
 
-        res = VirtualAlloc ((LPVOID)start, length, MEM_COMMIT, PAGE_READWRITE);
+        /* Use "0" instead of "start" as the first argument to VirtualAlloc
+         * because it is more stable on MinGW (at least).
+         */
+        res = VirtualAlloc ((LPVOID)0/*start*/, length, MEM_COMMIT, PAGE_READWRITE);
         if (NULL == res)
                 res = (void*)-1;
         return res;