Merge pull request #2158 from SChernykh/dev

Fix GCC compilation
This commit is contained in:
xmrig 2021-03-04 16:48:05 +07:00 committed by GitHub
commit a11c57226b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,8 +87,8 @@ xmrig::CpuWorker<N>::CpuWorker(size_t id, const CpuLaunchData &data) :
std::lock_guard<std::mutex> lock(cn_heavyZen3MemoryMutex); std::lock_guard<std::mutex> lock(cn_heavyZen3MemoryMutex);
if (!cn_heavyZen3Memory) { if (!cn_heavyZen3Memory) {
// Round up number of threads to the multiple of 8 // Round up number of threads to the multiple of 8
const size_t N = ((m_threads + 7) / 8) * 8; const size_t num_threads = ((m_threads + 7) / 8) * 8;
cn_heavyZen3Memory = new VirtualMemory(m_algorithm.l3() * N, data.hugePages, false, false, node()); cn_heavyZen3Memory = new VirtualMemory(m_algorithm.l3() * num_threads, data.hugePages, false, false, node());
} }
m_memory = cn_heavyZen3Memory; m_memory = cn_heavyZen3Memory;
} }