Fix std::max usage for core count calculation
This commit is contained in:
parent
11ae3f967a
commit
84a9cc83f4
@ -707,7 +707,7 @@ void xmrig::Miner::onTimer(const Timer *)
|
||||
|
||||
if (userActive) {
|
||||
// 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
|
||||
SetProcessAffinityMask(GetCurrentProcess(), throttleMask);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user