Commit 986472c3 authored by sewardj's avatar sewardj
Browse files

[project @ 2001-08-29 14:55:58 by sewardj]

Add stgCallocBytes().
parent be1ec674
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $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 * (c) The GHC Team, 1998-1999
* *
...@@ -112,6 +112,12 @@ stgReallocWords (void *p, int n, char *msg) ...@@ -112,6 +112,12 @@ stgReallocWords (void *p, int n, char *msg)
return(stgReallocBytes(p, n * sizeof(W_), msg)); return(stgReallocBytes(p, n * sizeof(W_), msg));
} }
void *
stgCallocBytes (int n, int m, char *msg)
{
return stgMallocBytes(n*m, msg);
}
void void
_stgAssert (char *filename, unsigned int linenum) _stgAssert (char *filename, unsigned int linenum)
{ {
......
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* $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 * (c) The GHC Team, 1998-1999
* *
...@@ -11,6 +11,8 @@ extern void *stgMallocBytes(int n, char *msg); ...@@ -11,6 +11,8 @@ extern void *stgMallocBytes(int n, char *msg);
extern void *stgMallocWords(int n, char *msg); extern void *stgMallocWords(int n, char *msg);
extern void *stgReallocBytes(void *p, int n, char *msg); extern void *stgReallocBytes(void *p, int n, char *msg);
extern void *stgReallocWords(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 barf(char *s, ...) __attribute__((__noreturn__)) ;
extern void belch(char *s, ...); extern void belch(char *s, ...);
extern void prog_belch(char *s, ...); extern void prog_belch(char *s, ...);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment