EPANET
3.0
EPANET Development Project
Main Page
Classes
Files
File List
File Members
src
Utilities
mempool.h
Go to the documentation of this file.
1
/* EPANET 3
2
*
3
* Copyright (c) 2016 Open Water Analytics
4
* Licensed under the terms of the MIT License (see the LICENSE file for details).
5
*
6
*/
7
10
11
#ifndef MEMPOOL_H_
12
#define MEMPOOL_H_
13
14
#include <cstddef>
15
16
struct
MemBlock
;
17
20
21
class
MemPool
22
{
23
public
:
24
MemPool
();
25
~
MemPool
();
26
char
* alloc(std::size_t size);
27
void
reset();
28
29
private
:
30
MemBlock
* first;
31
MemBlock
* current;
32
};
33
34
#endif
MemPool
A simple pooled memory allocator.
Definition:
mempool.h:21
MemBlock
Definition:
mempool.cpp:23
Generated by
1.8.11