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)
|
xmrig::RxVm::RxVm(RxDataset *dataset, bool hugePages, bool softAes)
|
||||||
{
|
{
|
||||||
m_flags = RANDOMX_FLAG_JIT;
|
|
||||||
if (hugePages) {
|
if (hugePages) {
|
||||||
m_flags |= RANDOMX_FLAG_LARGE_PAGES;
|
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;
|
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());
|
m_vm = randomx_create_vm(static_cast<randomx_flags>(m_flags), dataset->cache()->get(), dataset->get());
|
||||||
|
|
||||||
if (!m_vm) {
|
if (!m_vm) {
|
||||||
|
@ -54,7 +57,7 @@ xmrig::RxVm::RxVm(RxDataset *dataset, bool hugePages, bool softAes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_vm) {
|
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());
|
m_vm = randomx_create_vm(static_cast<randomx_flags>(m_flags), dataset->cache()->get(), dataset->get());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue