OpenSWMM Engine  6.0.0-alpha.4
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
mempool.h
Go to the documentation of this file.
1//-----------------------------------------------------------------------------
2// mempool.h
3//
4// Header for mempool.c
5//
6// The type alloc_handle_t provides an opaque reference to the
7// alloc pool - only the alloc routines know its structure.
8//-----------------------------------------------------------------------------
9
19
20#ifndef MEMPOOL_H
21#define MEMPOOL_H
22
23typedef struct {
24 long dummy;
26
28char* Alloc(long);
30void AllocReset(void);
31void AllocFreePool(void);
32
33#endif //MEMPOOL_H
void AllocReset(void)
Rewind the current pool for reuse without releasing its blocks.
Definition mempool.c:210
char * Alloc(long)
Reserve four-byte-aligned storage from the current pool.
Definition mempool.c:140
alloc_handle_t * AllocInit(void)
Create a pool and select it as the shared current allocation pool.
Definition mempool.c:109
void AllocFreePool(void)
Free every block/header and the root of the shared current pool.
Definition mempool.c:228
alloc_handle_t * AllocSetPool(alloc_handle_t *)
Replace the shared current-pool selection without freeing either pool.
Definition mempool.c:191
Definition mempool.h:23
long dummy
Definition mempool.h:24