1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 08:23:34 -05:00

Fixed pool lock

This commit is contained in:
SChernykh
2020-04-07 18:48:02 +02:00
parent 69cbfd682a
commit 4d0edde66d

View File

@@ -406,6 +406,8 @@ extern "C" {
randomx_vm* vm = nullptr;
std::lock_guard<std::mutex> lock(vm_pool_mutex);
static uint8_t* vm_pool[64] = {};
static size_t vm_pool_offset[64] = {};
@@ -415,8 +417,6 @@ extern "C" {
node = 0;
}
std::lock_guard<std::mutex> lock(vm_pool_mutex);
if (!vm_pool[node]) {
vm_pool[node] = (uint8_t*) xmrig::VirtualMemory::allocateLargePagesMemory(VM_POOL_SIZE);
if (!vm_pool[node]) {