X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRtsUtils.c;h=5817a95871e176fdfe56ad67f9387c6f48dc9f4d;hb=f74458a707d766e7b9b04db7d27cb3f697100e4f;hp=64b7758d356807e50b652c76052aa8d13f049a10;hpb=fbe64026eac8b559693868f38e6a9e6dad8a8ec6;p=ghc-hetmet.git diff --git a/ghc/rts/RtsUtils.c b/ghc/rts/RtsUtils.c index 64b7758..5817a95 100644 --- a/ghc/rts/RtsUtils.c +++ b/ghc/rts/RtsUtils.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: RtsUtils.c,v 1.30 2003/03/19 18:41:19 sof Exp $ + * $Id: RtsUtils.c,v 1.33 2003/03/31 19:19:34 sof Exp $ * * (c) The GHC Team, 1998-2002 * @@ -109,18 +109,6 @@ stgReallocBytes (void *p, int n, char *msg) } void * -stgMallocWords (int n, char *msg) -{ - return(stgMallocBytes(n * sizeof(W_), msg)); -} - -void * -stgReallocWords (void *p, int n, char *msg) -{ - return(stgReallocBytes(p, n * sizeof(W_), msg)); -} - -void * stgCallocBytes (int n, int m, char *msg) { int i; @@ -130,6 +118,15 @@ stgCallocBytes (int n, int m, char *msg) return p; } +/* To simplify changing the underlying allocator used + * by stgMallocBytes(), provide stgFree() as well. + */ +void +stgFree(void* p) +{ + free(p); +} + void _stgAssert (char *filename, unsigned int linenum) { @@ -260,6 +257,7 @@ void resetNonBlockingFd(int fd STG_UNUSED) {} void setNonBlockingFd(int fd STG_UNUSED) {} #endif +#ifdef PAR static ullong startTime = 0; /* used in a parallel setup */ @@ -294,6 +292,7 @@ msTime(void) return t * LL(1000) - startTime; # endif } +#endif /* PAR */ /* ----------------------------------------------------------------------------- Print large numbers, with punctuation.