diff options
Diffstat (limited to 'rts/Arena.h')
-rw-r--r-- | rts/Arena.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/rts/Arena.h b/rts/Arena.h new file mode 100644 index 0000000000..7a2989e543 --- /dev/null +++ b/rts/Arena.h @@ -0,0 +1,25 @@ +/* ----------------------------------------------------------------------------- + (c) The University of Glasgow 2001 + + Arena allocation interface. + -------------------------------------------------------------------------- */ + +#ifndef ARENA_H +#define ARENA_H + +// Abstract type of arenas +typedef struct _Arena Arena; + +// Start a new arena +extern Arena * newArena ( void ); + +// Allocate memory in an arena +extern void * arenaAlloc ( Arena *, size_t ); + +// Free an entire arena +extern void arenaFree ( Arena * ); + +// For internal use only: +extern unsigned long arenaBlocks( void ); + +#endif /* ARENA_H */ |