Return memory to the OS; trac #698
[ghc-hetmet.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 /* Debugging  -------------------------------------------------------------- */
15
16 extern nat countBlocks       (bdescr *bd);
17 extern nat countAllocdBlocks (bdescr *bd);
18 extern void returnMemoryToOS(nat n);
19
20 #ifdef DEBUG
21 void checkFreeListSanity(void);
22 nat  countFreeList(void);
23 void markBlocks (bdescr *bd);
24 void reportUnmarkedBlocks (void);
25 #endif
26
27 extern lnat n_alloc_blocks;   // currently allocated blocks
28 extern lnat hw_alloc_blocks;  // high-water allocated blocks
29
30 #include "EndPrivate.h"
31
32 #endif /* BLOCK_ALLOC_H */