X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsUtils.c;h=a8ce114fae5ce808c40db2d0707f91aaa7d2173d;hb=a180093ae131228e438017c9a378ca4c2a4bcaaf;hp=7054f453e8dbe128bbf865635551795236337f7b;hpb=d888cbcbaa3b4113fca39b9a0888b404ed8ec9b8;p=ghc-hetmet.git diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 7054f45..a8ce114 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -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) {