Fix broken ARM64 build (#14313)
authorJan Vorlicek <janvorli@microsoft.com>
Wed, 4 Oct 2017 01:35:12 +0000 (03:35 +0200)
committerJan Kotas <jkotas@microsoft.com>
Wed, 4 Oct 2017 01:35:12 +0000 (18:35 -0700)
The std::max was being passed arguments of different types (int and DWORD).

src/pal/src/misc/sysinfo.cpp

index cb5dda62a8479af92e0fadaac8d0d72b95d136eb..bc55dadd4b14d3a672788aaa9ce87bb367847999 100644 (file)
@@ -489,7 +489,7 @@ PAL_GetLogicalProcessorCacheSizeFromOS()
         // Assume L3$/CPU grows linearly from 256K to 1.5M/CPU as logicalCPUs grows from 2 to 12 CPUs
         DWORD logicalCPUs = PAL_GetLogicalCpuCountFromOS();
 
-        cacheSize = logicalCPUs*std::min(1536, std::max(256, logicalCPUs*128))*1024;
+        cacheSize = logicalCPUs*std::min(1536, std::max(256, (int)logicalCPUs*128))*1024;
     }
 #endif