Browse Source

randomx_get_flags() automatically sets all flags except RANDOMX_FLAG_FULL_MEM, RANDOMX_FLAG_LARGE_PAGES and RANDOMX_FLAG_SECURE

duke
Duke 4 months ago
parent
commit
56ef56b136
  1. 11
      src/miner.cpp

11
src/miner.cpp

@ -1095,16 +1095,13 @@ void static RandomXMiner()
miningTimer.start();
randomx_flags flags = randomx_get_flags();
// TODO: attempt to use large pages and fall back to no large pages
// flags |= RANDOMX_FLAG_LARGE_PAGES;
flags |= RANDOMX_FLAG_FULL_MEM;
//flags |= RANDOMX_FLAG_JIT;
randomx_cache *randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_JIT | RANDOMX_FLAG_HARD_AES);
randomx_cache *randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES | RANDOMX_FLAG_SECURE );
if (randomxCache == NULL) {
LogPrintf("RandomX cache is null, trying without large pages and without jit ...\n");
randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_HARD_AES);
LogPrintf("RandomX cache is null, trying without large pages...\n");
randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_SECURE);
if (randomxCache == NULL) {
LogPrintf("RandomX cache is null, trying without hardware AES...\n");
LogPrintf("RandomX cache is null, trying without secure...\n");
}
randomxCache = randomx_alloc_cache(flags);
if (randomxCache == NULL) {

Loading…
Cancel
Save