1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 1998-2004
5 * General utility functions used in the RTS.
7 * ---------------------------------------------------------------------------*/
12 /* (Checked) dynamic allocation: */
13 extern void *stgMallocBytes(int n, char *msg) GNUC3_ATTRIBUTE(__malloc__);
14 extern void *stgReallocBytes(void *p, int n, char *msg);
15 extern void *stgCallocBytes(int n, int m, char *msg) GNUC3_ATTRIBUTE(__malloc__);
16 extern void stgFree(void* p);
18 extern void barf(char *s, ...) GNU_ATTRIBUTE(__noreturn__);
19 extern void belch(char *s, ...);
20 extern void prog_belch(char *s, ...);
22 extern void _stgAssert (char *filename, unsigned int linenum);
24 extern void heapOverflow(void);
26 extern void setNonBlockingFd(int fd);
27 extern void resetNonBlockingFd(int fd);
29 extern nat stg_strlen(char *str);
32 char *ullong_format_string(ullong, char *, rtsBool);
39 extern void heapCheckFail( void );
42 extern void* __hscore_get_saved_termios(int fd);
43 extern void __hscore_set_saved_termios(int fd, void* ts);