cpp: Use #pragma once instead of #ifndef guards
[ghc.git] / includes / rts / storage / MBlock.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 1998-2008
4 *
5 * MegaBlock Allocator interface.
6 *
7 * See wiki commentary at
8 * http://ghc.haskell.org/trac/ghc/wiki/Commentary/HeapAlloced
9 *
10 * ---------------------------------------------------------------------------*/
11
12 #pragma once
13
14 extern W_ peak_mblocks_allocated;
15 extern W_ mblocks_allocated;
16
17 extern void initMBlocks(void);
18 extern void * getMBlock(void);
19 extern void * getMBlocks(uint32_t n);
20 extern void * getMBlockOnNode(uint32_t node);
21 extern void * getMBlocksOnNode(uint32_t node, uint32_t n);
22 extern void freeMBlocks(void *addr, uint32_t n);
23 extern void releaseFreeMemory(void);
24 extern void freeAllMBlocks(void);
25
26 extern void *getFirstMBlock(void **state);
27 extern void *getNextMBlock(void **state, void *mblock);
28
29 #ifdef THREADED_RTS
30 // needed for HEAP_ALLOCED below
31 extern SpinLock gc_alloc_block_sync;
32 #endif