]> 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 3673446af24dcc9e89a72418d24516deff914f5f..77a4eabbd5aacca9bdd22776718c896ad7952084 100644 (file)
@@ -33,14 +33,14 @@ 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
-               #ifdef _WIN32\r
+               #if defined(_WIN32) && !defined(__GNUC__)\r
                        printf( "Debug: nAvailPhys: %I64u\n", nAvailPhys );\r
                #else\r
-                       printf( "Debug: nAvailPhys: %llu\n", nAvailPhys );\r
+                       printf( "Debug: nAvailPhys: %lu\n", nAvailPhys );\r
                #endif\r
                printf( "Debug: bytesSaved: %d\n", bytesSaved );\r
        }\r
@@ -91,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