Fixed available sys memory calc to work in KBs. Changed to boost::uint64_t for Visual C++ compilation
This commit is contained in:
parent
789cb99292
commit
e603a41fb6
@ -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<uint64_t>(amountOfRAM) * 1024 * 1024 * 1024;
|
||||
boost::uint64_t memory_to_use = static_cast<boost::uint64_t>(amountOfRAM) * 1024 * 1024 * 1024;
|
||||
|
||||
cout << "[extractor] Sorting used nodes ... " << flush;
|
||||
stxxl::sort(externalMemory.usedNodeIDs.begin(), externalMemory.usedNodeIDs.end(), Cmp(), memory_to_use);
|
||||
|
Loading…
Reference in New Issue
Block a user