Commit d47e53b8 authored by Victor Poughon's avatar Victor Poughon

Merge branch 'increase_default_ram' into 'develop'

Increase default ram limit to 256MB

Closes #1784

See merge request !351
parents 74115d42 c379bae6
......@@ -53,22 +53,16 @@ std::string ConfigurationManager::GetGeoidFile()
ConfigurationManager::RAMValueType ConfigurationManager::GetMaxRAMHint()
{
std::string svalue;
RAMValueType value = 128;
if(itksys::SystemTools::GetEnv("OTB_MAX_RAM_HINT",svalue))
{
unsigned long int tmp = strtoul(svalue.c_str(),nullptr,10);
if(tmp)
{
value = static_cast<RAMValueType>(tmp);
}
}
return value;
std::string max_ram_hint;
if (itksys::SystemTools::GetEnv("OTB_MAX_RAM_HINT", max_ram_hint))
{
return std::stoul(max_ram_hint);
}
else
{
// Default value
return 256;
}
}
itk::LoggerBase::PriorityLevelType ConfigurationManager::GetLoggerLevel()
......
......@@ -167,7 +167,7 @@ otb_add_test(NAME coTvImageRegionNonUniformMultidimensionalSplitter COMMAND otbC
otb_add_test(NAME coTvConfigurationManagerDefault COMMAND otbCommonTestDriver
otbConfigurationManagerTest
128)
256)
otb_add_test(NAME coTvConfigurationManagerEnvVar COMMAND otbTestDriver
--add-before-env OTB_MAX_RAM_HINT "256"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment