diff --git a/src/backend/cpu/CpuWorker.cpp b/src/backend/cpu/CpuWorker.cpp index 6263f89a..818ea0c8 100644 --- a/src/backend/cpu/CpuWorker.cpp +++ b/src/backend/cpu/CpuWorker.cpp @@ -87,8 +87,8 @@ xmrig::CpuWorker::CpuWorker(size_t id, const CpuLaunchData &data) : std::lock_guard lock(cn_heavyZen3MemoryMutex); if (!cn_heavyZen3Memory) { // Round up number of threads to the multiple of 8 - const size_t N = ((m_threads + 7) / 8) * 8; - cn_heavyZen3Memory = new VirtualMemory(m_algorithm.l3() * N, data.hugePages, false, false, node()); + const size_t num_threads = ((m_threads + 7) / 8) * 8; + cn_heavyZen3Memory = new VirtualMemory(m_algorithm.l3() * num_threads, data.hugePages, false, false, node()); } m_memory = cn_heavyZen3Memory; }