From 282367ed6db79eaedbe3389ffd17a255750d8a74 Mon Sep 17 00:00:00 2001 From: Vladislav Sytchenko Date: Wed, 11 Dec 2019 20:21:12 -0500 Subject: [PATCH] Reduce the amount of free host memory to 40% of what is reported on Windows, otherwise we can run into OOM situations. --- hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp index 208f263ab5..5c21be4acf 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemcpy.cpp @@ -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;