1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 1998-2005
5 * General utility functions used in the RTS.
7 * ---------------------------------------------------------------------------*/
12 /* -----------------------------------------------------------------------------
13 * (Checked) dynamic allocation
14 * -------------------------------------------------------------------------- */
16 extern void initAllocator(void);
17 extern void shutdownAllocator(void);
19 extern void *stgMallocBytes(int n, char *msg)
20 GNUC3_ATTRIBUTE(__malloc__);
22 extern void *stgReallocBytes(void *p, int n, char *msg);
24 extern void *stgCallocBytes(int n, int m, char *msg)
25 GNUC3_ATTRIBUTE(__malloc__);
27 extern void stgFree(void* p);
29 /* -----------------------------------------------------------------------------
30 * Misc other utilities
31 * -------------------------------------------------------------------------- */
33 extern void heapOverflow(void);
35 extern void setNonBlockingFd(int fd);
36 extern void resetNonBlockingFd(int fd);
38 extern nat stg_strlen(char *str);
40 extern char *time_str(void);
41 extern char *ullong_format_string(ullong, char *, rtsBool);
44 extern ullong msTime(void);
48 extern void heapCheckFail( void );
51 extern void* __hscore_get_saved_termios(int fd);
52 extern void __hscore_set_saved_termios(int fd, void* ts);
54 void printRtsInfo(void);
56 #endif /* RTSUTILS_H */