From e603a41fb6947fd00d9b2f972535aac9e36ddeb9 Mon Sep 17 00:00:00 2001 From: Sasa Ivetic Date: Wed, 5 Oct 2011 11:04:01 -0500 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 5ed9a4da4..769c62cb8 100644 --- a/extractor.cpp +++ b/extractor.cpp @@ -133,7 +133,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; } @@ -177,7 +177,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);