1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 1998-2009
5 * General utility functions used in the RTS.
7 * ---------------------------------------------------------------------------*/
12 #include "BeginPrivate.h"
14 /* -----------------------------------------------------------------------------
15 * (Checked) dynamic allocation
16 * -------------------------------------------------------------------------- */
18 void initAllocator(void);
19 void shutdownAllocator(void);
21 void *stgMallocBytes(int n, char *msg)
22 GNUC3_ATTRIBUTE(__malloc__);
24 void *stgReallocBytes(void *p, int n, char *msg);
26 void *stgCallocBytes(int n, int m, char *msg)
27 GNUC3_ATTRIBUTE(__malloc__);
29 void stgFree(void* p);
31 /* -----------------------------------------------------------------------------
32 * Misc other utilities
33 * -------------------------------------------------------------------------- */
35 void heapOverflow(void);
38 char *showStgWord64(StgWord64, char *, rtsBool);
41 void heapCheckFail( void );
44 void printRtsInfo(void);
46 /* Alternate to raise(3) for threaded rts, for OpenBSD */
47 int genericRaise(int sig);
49 int rts_isProfiled(void);
51 #include "EndPrivate.h"
53 #endif /* RTSUTILS_H */