|
|
@ -1068,14 +1068,19 @@ 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;
|
|
|
|
// attempt to use large pages and fall back to no large pages
|
|
|
|
flags |= RANDOMX_FLAG_FULL_MEM; |
|
|
|
//flags |= RANDOMX_FLAG_JIT;
|
|
|
|
randomx_cache *randomxCache = randomx_alloc_cache(flags); |
|
|
|
if (randomxCache == NULL) { |
|
|
|
LogPrintf("RandomX cache is null, something is wrong, cannot mine!\n"); |
|
|
|
return; |
|
|
|
//flags |= RANDOMX_FLAG_LARGE_PAGES;
|
|
|
|
randomx_cache *randomxCache = randomx_alloc_cache(flags | RANDOMX_FLAG_LARGE_PAGES); |
|
|
|
if (randomxCache == nullptr) { |
|
|
|
fprintf(stderr,"%s: unable to allocate with large pages\n", __func__); |
|
|
|
LogPrintf("Unable to use randomx large pages, trying without...\n"); |
|
|
|
randomx_cache *randomxCache = randomx_alloc_cache(flags); |
|
|
|
if (randomxCache == nullptr) { |
|
|
|
LogPrintf("Unable to create randomx cache, cannot mine!\n"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
rxdebug("%s: created randomx flags + cache\n"); |
|
|
|
randomx_dataset *randomxDataset = randomx_alloc_dataset(flags); |
|
|
|