Make start address of `osReserveHeapMemory` tunable via command line -xb
[ghc.git] / rts / RtsUtils.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2009
4 *
5 * General utility functions used in the RTS.
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef RTSUTILS_H
10 #define RTSUTILS_H
11
12 #include "BeginPrivate.h"
13
14 /* -----------------------------------------------------------------------------
15 * (Checked) dynamic allocation
16 * -------------------------------------------------------------------------- */
17
18 void initAllocator(void);
19 void shutdownAllocator(void);
20
21 void *stgMallocBytes(size_t n, char *msg)
22 GNUC3_ATTRIBUTE(__malloc__);
23
24 void *stgReallocBytes(void *p, size_t n, char *msg);
25
26 void *stgCallocBytes(size_t n, size_t m, char *msg)
27 GNUC3_ATTRIBUTE(__malloc__);
28
29 char *stgStrndup(const char *s, size_t n);
30
31 void stgFree(void* p);
32
33 /* -----------------------------------------------------------------------------
34 * Misc other utilities
35 * -------------------------------------------------------------------------- */
36
37 void heapOverflow(void);
38
39 char *time_str(void);
40 char *showStgWord64(StgWord64, char *, rtsBool);
41
42 #ifdef DEBUG
43 void heapCheckFail( void );
44 #endif
45
46 void printRtsInfo(void);
47
48 void checkFPUStack(void);
49
50 #include "EndPrivate.h"
51
52 #endif /* RTSUTILS_H */