086a0200adcc8a7ee466bcb8942a2e7904939cac
[ghc.git] / rts / Arena.h
1 /* -----------------------------------------------------------------------------
2 (c) The University of Glasgow 2001
3
4 Arena allocation interface.
5 -------------------------------------------------------------------------- */
6
7 #ifndef ARENA_H
8 #define ARENA_H
9
10 // Abstract type of arenas
11 typedef struct _Arena Arena;
12
13 // Start a new arena
14 RTS_PRIVATE Arena * newArena ( void );
15
16 // Allocate memory in an arena
17 RTS_PRIVATE void * arenaAlloc ( Arena *, size_t );
18
19 // Free an entire arena
20 RTS_PRIVATE void arenaFree ( Arena * );
21
22 // For internal use only:
23 RTS_PRIVATE unsigned long arenaBlocks( void );
24
25 #endif /* ARENA_H */