1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 1998-2009
5 * General utility functions used in the RTS.
7 * ---------------------------------------------------------------------------*/
12 /* -----------------------------------------------------------------------------
13 * (Checked) dynamic allocation
14 * -------------------------------------------------------------------------- */
16 void initAllocator(void);
17 void shutdownAllocator(void);
19 void *stgMallocBytes(int n, char *msg)
20 GNUC3_ATTRIBUTE(__malloc__);
22 void *stgReallocBytes(void *p, int n, char *msg);
24 void *stgCallocBytes(int n, int m, char *msg)
25 GNUC3_ATTRIBUTE(__malloc__);
27 void stgFree(void* p);
29 /* -----------------------------------------------------------------------------
30 * Misc other utilities
31 * -------------------------------------------------------------------------- */
33 void heapOverflow(void);
36 char *ullong_format_string(ullong, char *, rtsBool);
39 void heapCheckFail( void );
42 void printRtsInfo(void);
45 HsInt resetGenSymZh(void);
47 /* Alternate to raise(3) for threaded rts, for OpenBSD */
48 int genericRaise(int sig);
50 int rts_isProfiled(void);
52 #endif /* RTSUTILS_H */