NUMA support
[ghc.git] / rts / sm / BlockAlloc.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-1999
4 *
5 * Block Allocator Interface
6 *
7 * ---------------------------------------------------------------------------*/
8
9 #ifndef BLOCK_ALLOC_H
10 #define BLOCK_ALLOC_H
11
12 #include "BeginPrivate.h"
13
14 bdescr *allocLargeChunk (W_ min, W_ max);
15 bdescr *allocLargeChunkOnNode (uint32_t node, W_ min, W_ max);
16
17 /* Debugging -------------------------------------------------------------- */
18
19 extern W_ countBlocks (bdescr *bd);
20 extern W_ countAllocdBlocks (bdescr *bd);
21 extern void returnMemoryToOS(uint32_t n);
22
23 #ifdef DEBUG
24 void checkFreeListSanity(void);
25 W_ countFreeList(void);
26 void markBlocks (bdescr *bd);
27 void reportUnmarkedBlocks (void);
28 #endif
29
30 extern W_ n_alloc_blocks; // currently allocated blocks
31 extern W_ hw_alloc_blocks; // high-water allocated blocks
32
33 #include "EndPrivate.h"
34
35 #endif /* BLOCK_ALLOC_H */