From fd7763c587c305a562b68ee8fc0846dedf7061be Mon Sep 17 00:00:00 2001 From: sewardj Date: Wed, 29 Aug 2001 15:02:02 +0000 Subject: [PATCH] [project @ 2001-08-29 15:02:02 by sewardj] Duh. Remember to actually zero out the space in stgCallocBytes. Duh. --- ghc/rts/RtsUtils.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 -- 1.7.10.4