Add explicit cast when computing the available amount of system memory.
[ROCm/clr commit: 4c21eed68b]
Cette révision appartient à :
1 Parent
d2be30f0e0
révision
014f068e2f
1 fichier modifié
+2
-2
@@ -292,8 +292,8 @@ void memcpytest2_get_host_memory(size_t& free, size_t& total) {
|
||||
MEMORYSTATUSEX status;
|
||||
status.dwLength = sizeof(status);
|
||||
GlobalMemoryStatusEx(&status);
|
||||
free = (0.4 * status.ullAvailPhys);
|
||||
total = (0.4 * status.ullTotalPhys);
|
||||
free = static_cast<size_t>(0.4 * status.ullAvailPhys);
|
||||
total = static_cast<size_t>(0.4 * status.ullTotalPhys);
|
||||
}
|
||||
#else
|
||||
struct sysinfo memInfo;
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur