[project @ 2001-09-21 13:24:37 by simonmar]
[ghc-hetmet.git] / ghc / rts / RtsUtils.c
index 7054f45..a8ce114 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsUtils.c,v 1.19 2001/07/24 06:31:36 ken Exp $
+ * $Id: RtsUtils.c,v 1.22 2001/08/29 15:02:02 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -8,7 +8,7 @@
  * ---------------------------------------------------------------------------*/
 
 /* gettimeofday isn't POSIX */
-#define NON_POSIX_SOURCE
+/* #include "PosixSource.h" */
 
 #include "Rts.h"
 #include "RtsTypes.h"
@@ -112,6 +112,16 @@ stgReallocWords (void *p, int n, char *msg)
   return(stgReallocBytes(p, n * sizeof(W_), msg));
 }
 
+void *
+stgCallocBytes (int n, int m, char *msg)
+{
+  int   i;
+  int   sz = n * m;
+  char* p  = stgMallocBytes(sz, msg);
+  for (i = 0; i < sz; i++) p[i] = 0;
+  return p;
+}
+
 void 
 _stgAssert (char *filename, unsigned int linenum)
 {