mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Fixed RandomX VM creation in some cases.
This commit is contained in:
parent
270d3ba6a2
commit
8e2219b7c4
1 changed files with 5 additions and 2 deletions
|
@ -33,7 +33,6 @@
|
|||
|
||||
xmrig::RxVm::RxVm(RxDataset *dataset, bool hugePages, bool softAes)
|
||||
{
|
||||
m_flags = RANDOMX_FLAG_JIT;
|
||||
if (hugePages) {
|
||||
m_flags |= RANDOMX_FLAG_LARGE_PAGES;
|
||||
}
|
||||
|
@ -46,6 +45,10 @@ xmrig::RxVm::RxVm(RxDataset *dataset, bool hugePages, bool softAes)
|
|||
m_flags |= RANDOMX_FLAG_FULL_MEM;
|
||||
}
|
||||
|
||||
if (dataset->cache()->isJIT()) {
|
||||
m_flags |= RANDOMX_FLAG_JIT;
|
||||
}
|
||||
|
||||
m_vm = randomx_create_vm(static_cast<randomx_flags>(m_flags), dataset->cache()->get(), dataset->get());
|
||||
|
||||
if (!m_vm) {
|
||||
|
@ -54,7 +57,7 @@ xmrig::RxVm::RxVm(RxDataset *dataset, bool hugePages, bool softAes)
|
|||
}
|
||||
|
||||
if (!m_vm) {
|
||||
m_flags &= ~RANDOMX_FLAG_JIT;
|
||||
m_flags &= ~RANDOMX_FLAG_HARD_AES;
|
||||
m_vm = randomx_create_vm(static_cast<randomx_flags>(m_flags), dataset->cache()->get(), dataset->get());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue