Deprecate lnat, and use StgWord instead
[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 (nat min, nat max);
15
16 /* Debugging -------------------------------------------------------------- */
17
18 extern nat countBlocks (bdescr *bd);
19 extern nat countAllocdBlocks (bdescr *bd);
20 extern void returnMemoryToOS(nat n);
21
22 #ifdef DEBUG
23 void checkFreeListSanity(void);
24 nat countFreeList(void);
25 void markBlocks (bdescr *bd);
26 void reportUnmarkedBlocks (void);
27 #endif
28
29 extern W_ n_alloc_blocks; // currently allocated blocks
30 extern W_ hw_alloc_blocks; // high-water allocated blocks
31
32 #include "EndPrivate.h"
33
34 #endif /* BLOCK_ALLOC_H */