From: sewardj Date: Wed, 29 Aug 2001 14:55:58 +0000 (+0000) Subject: [project @ 2001-08-29 14:55:58 by sewardj] X-Git-Tag: Approximately_9120_patches~1053 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=986472c3dffec8ee02874de3b001c0964520be4d;p=ghc-hetmet.git [project @ 2001-08-29 14:55:58 by sewardj] Add stgCallocBytes(). --- diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 1820c79..cc90b39 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.c,v 1.20 2001/08/14 13:40:09 sewardj Exp $ + * $Id: RtsUtils.c,v 1.21 2001/08/29 14:55:58 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -112,6 +112,12 @@ stgReallocWords (void *p, int n, char *msg) return(stgReallocBytes(p, n * sizeof(W_), msg)); } +void * +stgCallocBytes (int n, int m, char *msg) +{ + return stgMallocBytes(n*m, msg); +} + void _stgAssert (char *filename, unsigned int linenum) { diff --git a/ghc/rts/RtsUtils.h b/ghc/rts/RtsUtils.h index 428061a..cb01e32 100644 --- a/ghc/rts/RtsUtils.h +++ b/ghc/rts/RtsUtils.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.h,v 1.10 2000/05/18 11:32:21 panne Exp $ + * $Id: RtsUtils.h,v 1.11 2001/08/29 14:55:58 sewardj Exp $ * * (c) The GHC Team, 1998-1999 * @@ -11,6 +11,8 @@ extern void *stgMallocBytes(int n, char *msg); extern void *stgMallocWords(int n, char *msg); extern void *stgReallocBytes(void *p, int n, char *msg); extern void *stgReallocWords(void *p, int n, char *msg); +extern void *stgCallocBytes(int n, int m, char *msg); + extern void barf(char *s, ...) __attribute__((__noreturn__)) ; extern void belch(char *s, ...); extern void prog_belch(char *s, ...);