Fix std::max usage for core count calculation
This commit is contained in:
+1
-1
@@ -707,7 +707,7 @@ void xmrig::Miner::onTimer(const Timer *)
|
|||||||
|
|
||||||
if (userActive) {
|
if (userActive) {
|
||||||
// 25% of cores for throttling
|
// 25% of cores for throttling
|
||||||
DWORD coresToUse = max(1UL, totalCores / 4);
|
DWORD coresToUse = std::max(1UL, totalCores / 4);
|
||||||
DWORD_PTR throttleMask = (1ULL << coresToUse) - 1; // First N cores
|
DWORD_PTR throttleMask = (1ULL << coresToUse) - 1; // First N cores
|
||||||
SetProcessAffinityMask(GetCurrentProcess(), throttleMask);
|
SetProcessAffinityMask(GetCurrentProcess(), throttleMask);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user