From: sewardj Date: Wed, 29 Aug 2001 15:02:02 +0000 (+0000) Subject: [project @ 2001-08-29 15:02:02 by sewardj] X-Git-Tag: Approximately_9120_patches~1052 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fd7763c587c305a562b68ee8fc0846dedf7061be;p=ghc-hetmet.git [project @ 2001-08-29 15:02:02 by sewardj] Duh. Remember to actually zero out the space in stgCallocBytes. Duh. --- diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index cc90b39..a8ce114 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -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