mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Make memory critical threshold limits different on Linxu and Windows.
This commit is contained in:
parent
8f0fb820a5
commit
e3bffafb46
@ -1722,7 +1722,7 @@ void RiuMainWindow::updateMemoryUsage()
|
||||
(int)(okColor.blue() * (1.0 - currentUsageFraction) + warningColor.blue() * currentUsageFraction));
|
||||
|
||||
m_memoryCriticalWarning->setText(QString(""));
|
||||
if (availVirtualFraction < 0.175)
|
||||
if (availVirtualFraction < caf::MemoryInspector::getRemainingMemoryCriticalThresholdFraction())
|
||||
{
|
||||
m_memoryCriticalWarning->setText(QString("Available System Memory Critically Low!"));
|
||||
m_memoryCriticalWarning->setStyleSheet(QString("QLabel {color: %1; padding: 0px 5px 0px 0px;}").arg(criticalColor.name()));
|
||||
|
@ -143,3 +143,15 @@ uint64_t caf::MemoryInspector::getAvailableVirtualMemoryMiB()
|
||||
return 0u;
|
||||
#endif
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
float caf::MemoryInspector::getRemainingMemoryCriticalThresholdFraction()
|
||||
{
|
||||
#ifdef __linux__
|
||||
return 0.175f;
|
||||
#else
|
||||
return 0.05f;
|
||||
#endif
|
||||
}
|
||||
|
@ -47,5 +47,6 @@ namespace caf
|
||||
uint64_t getTotalVirtualMemoryMiB();
|
||||
uint64_t getTotalPhysicalMemoryMiB();
|
||||
uint64_t getAvailableVirtualMemoryMiB();
|
||||
float getRemainingMemoryCriticalThresholdFraction();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user