]> git.sesse.net Git - freerainbowtables/blobdiff - Client Applications/rcracki_mt/MemoryPool.cpp
Merge branch 'master' of git@gitorious.org:freerainbowtables-applications/freerainbow...
[freerainbowtables] / Client Applications / rcracki_mt / MemoryPool.cpp
index f48961d895dfdceb07a28843378ebe5f023ee405..77a4eabbd5aacca9bdd22776718c896ad7952084 100644 (file)
@@ -8,7 +8,7 @@
  * Copyright 2009, 2010 James Nobis <frt@quelrod.net>\r
  * Copyright 2010 uroskn\r
  *\r
- * This file is part of racrcki_mt.\r
+ * This file is part of rcracki_mt.\r
  *\r
  * rcracki_mt is free software: you can redistribute it and/or modify\r
  * it under the terms of the GNU General Public License as published by\r
@@ -33,11 +33,15 @@ CMemoryPool::CMemoryPool(unsigned int bytesSaved, bool bDebug, uint64 maxMem)
        m_nMemSize = 0;\r
        debug = bDebug;\r
 \r
-       uint64 nAvailPhys = GetAvailPhysMemorySize();\r
+       unsigned long nAvailPhys = GetAvailPhysMemorySize();\r
 \r
        if ( debug )\r
        {\r
-               printf( "Debug: nAvailPhys: %llu\n", nAvailPhys );\r
+               #if defined(_WIN32) && !defined(__GNUC__)\r
+                       printf( "Debug: nAvailPhys: %I64u\n", nAvailPhys );\r
+               #else\r
+                       printf( "Debug: nAvailPhys: %lu\n", nAvailPhys );\r
+               #endif\r
                printf( "Debug: bytesSaved: %d\n", bytesSaved );\r
        }\r
 \r
@@ -87,8 +91,8 @@ unsigned char* CMemoryPool::Allocate(unsigned int nFileLen, uint64& nAllocatedSi
        m_pMem = new (nothrow) unsigned char[nTargetSize];\r
        while (m_pMem == NULL && nTargetSize >= 32 * 1024 * 1024 )\r
        {\r
-          nTargetSize -= 16 * 1024 * 1024;\r
-          m_pMem = new (nothrow) unsigned char[nTargetSize];\r
+               nTargetSize -= 16 * 1024 * 1024;\r
+               m_pMem = new (nothrow) unsigned char[nTargetSize];\r
        }\r
 \r
        if (m_pMem != NULL)\r