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