]> git.sesse.net Git - freerainbowtables/blob - Common/rt api/MemoryPool.h
(C)
[freerainbowtables] / Common / rt api / MemoryPool.h
1 /*
2  * freerainbowtables is a project for generating, distributing, and using
3  * perfect rainbow tables
4  *
5  * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
6  * Copyright 2010 Martin Westergaard Jørgensen <martinwj2005@gmail.com>
7  * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>
8  * Copyright 2009, 2010, 2011 James Nobis <frt@quelrod.net>
9  * Copyright 2010 uroskn
10  *
11  * This file is part of freerainbowtables.
12  *
13  * freerainbowtables is free software: you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation, either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * freerainbowtables is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with freerainbowtables.  If not, see <http://www.gnu.org/licenses/>.
25  */
26
27 #ifndef _MEMORYPOOL_H
28 #define _MEMORYPOOL_H
29
30 #include "global.h"
31
32 class CMemoryPool  
33 {
34 public:
35         CMemoryPool();
36         virtual ~CMemoryPool();
37
38 private:
39         bool debug;
40         unsigned char* m_pMem;
41         uint64 m_nMemSize;
42
43         uint64 m_nMemMax;
44
45 public:
46         unsigned char* Allocate(unsigned int nFileLen, uint64& nAllocatedSize);
47 };
48
49 #endif