Make memory critical threshold limits different on Linxu and Windows.

This commit is contained in:
Gaute Lindkvist
2018-06-18 10:16:02 +02:00
parent 8f0fb820a5
commit e3bffafb46
3 changed files with 14 additions and 1 deletions

View File

@@ -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
}

View File

@@ -47,5 +47,6 @@ namespace caf
uint64_t getTotalVirtualMemoryMiB();
uint64_t getTotalPhysicalMemoryMiB();
uint64_t getAvailableVirtualMemoryMiB();
float getRemainingMemoryCriticalThresholdFraction();
}
}