Skip to content
Snippets Groups Projects
Commit d47e53b8 authored by Victor Poughon's avatar Victor Poughon
Browse files

Merge branch 'increase_default_ram' into 'develop'

Increase default ram limit to 256MB

Closes #1784

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