Reduce the amount of free host memory to 40% of what is reported on Windows, otherwise we can run into OOM situations.

This commit is contained in:
Vladislav Sytchenko
2019-12-11 20:21:12 -05:00
parent 539370d308
commit 282367ed6d
@@ -292,8 +292,8 @@ void memcpytest2_get_host_memory(size_t& free, size_t& total) {
MEMORYSTATUSEX status;
status.dwLength = sizeof(status);
GlobalMemoryStatusEx(&status);
free = status.ullAvailPhys;
total = status.ullTotalPhys;
free = (0.4 * status.ullAvailPhys);
total = (0.4 * status.ullTotalPhys);
}
#else
struct sysinfo memInfo;