Hi,
I noticed a possible bug in the following function:
void SparseFileManager::setMaxMemUse(float maxMemUse)
{
m_maxMemUse = maxMemUse;
m_maxMemUseInBytes = static_cast<int>(m_maxMemUse * 1024*1024);
}
If maxMemUse > 2048, the cast to signed int causes m_maxMemUseInBytes to overflow to a negative value.
You might think this would make the memory limit effectively zero, but in fact it seems to make it effectively infinite (I turns the limit off), due (I suspect) to some further overflow in later calculations.
This means the global memory limit can't be set higher than 2Gb, which is fairly low for production volume renders with many volumes.
Is this actually a bug?
Jamie