[project @ 2002-04-19 10:25:00 by simonmar]
[ghc-hetmet.git] / ghc / rts / MBlock.c
index a8f34e8..7bb39d7 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: MBlock.c,v 1.26 2002/01/08 16:38:27 sof Exp $
+ * $Id: MBlock.c,v 1.28 2002/04/12 04:00:35 sof Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -48,7 +48,7 @@ getMBlock(void)
   return getMBlocks(1);
 }
 
-#ifndef _WIN32
+#if !defined(mingw32_TARGET_OS) && !defined(cygwin32_TARGET_OS)
 void *
 getMBlocks(nat n)
 {
@@ -76,7 +76,7 @@ getMBlocks(nat n)
   
   if (ret == (void *)-1) {
     if (errno == ENOMEM) {
-      barf("getMBlock: out of memory");
+      barf("getMBlock: out of memory (blocks requested: %d)", n);
     } else {
       barf("GetMBlock: mmap failed");
     }
@@ -95,7 +95,7 @@ getMBlocks(nat n)
   return ret;
 }
 
-#else /* _WIN32 */
+#else /* defined(mingw32_TARGET_OS) || defined(cygwin32_TARGET_OS) */
 
 /*
  On Win32 platforms we make use of the two-phased virtual memory API