[project @ 2001-08-29 15:02:02 by sewardj]
authorsewardj <unknown>
Wed, 29 Aug 2001 15:02:02 +0000 (15:02 +0000)
committersewardj <unknown>
Wed, 29 Aug 2001 15:02:02 +0000 (15:02 +0000)
Duh.  Remember to actually zero out the space in stgCallocBytes.  Duh.

ghc/rts/RtsUtils.c

index cc90b39..a8ce114 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: RtsUtils.c,v 1.21 2001/08/29 14:55:58 sewardj Exp $
+ * $Id: RtsUtils.c,v 1.22 2001/08/29 15:02:02 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -115,7 +115,11 @@ stgReallocWords (void *p, int n, char *msg)
 void *
 stgCallocBytes (int n, int m, char *msg)
 {
-  return stgMallocBytes(n*m, msg);
+  int   i;
+  int   sz = n * m;
+  char* p  = stgMallocBytes(sz, msg);
+  for (i = 0; i < sz; i++) p[i] = 0;
+  return p;
 }
 
 void