From 9f04305c12cb355b8dfa07fe9b834178770c6602 Mon Sep 17 00:00:00 2001 From: Sasa Ivetic Date: Thu, 6 Oct 2011 00:04:01 +0800 Subject: [PATCH] Fixed available sys memory calc to work in KBs. Changed to boost::uint64_t for Visual C++ compilation --- extractor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor.cpp b/extractor.cpp index b1b64f05a..a345fb2b4 100644 --- a/extractor.cpp +++ b/extractor.cpp @@ -154,7 +154,7 @@ int main (int argc, char *argv[]) { if(testDataFile("extractor.ini")) { ExtractorConfiguration extractorConfig("extractor.ini"); unsigned memoryAmountFromFile = atoi(extractorConfig.GetParameter("Memory").c_str()); - if( memoryAmountFromFile != 0 && memoryAmountFromFile <= installedRAM/(1024*1024*1024)) + if( memoryAmountFromFile != 0 && memoryAmountFromFile <= installedRAM/(1024*1024)) amountOfRAM = memoryAmountFromFile; cout << "[extractor] using " << amountOfRAM << " GB of RAM for buffers" << endl; } @@ -197,7 +197,7 @@ int main (int argc, char *argv[]) { cout << "[extractor] parsing finished after " << get_timestamp() - time << " seconds" << endl; time = get_timestamp(); - uint64_t memory_to_use = static_cast(amountOfRAM) * 1024 * 1024 * 1024; + boost::uint64_t memory_to_use = static_cast(amountOfRAM) * 1024 * 1024 * 1024; cout << "[extractor] Sorting used nodes ... " << flush; stxxl::sort(externalMemory.usedNodeIDs.begin(), externalMemory.usedNodeIDs.end(), Cmp(), memory_to_use);