diff options
author | psychocrypt <psychocryptHPC@gmail.com> | 2018-04-08 20:40:54 +0200 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2018-06-04 21:07:11 +0000 |
commit | 98c95315b3b48d29477b808134e574fbf25ad698 (patch) | |
tree | f45256f8c5d2b30e5a3b3729a496248031b57b33 /xmrstak/backend/cpu/autoAdjust.hpp | |
parent | 571e37a9269f71bc5f1c14ad963dee9f89a71ae5 (diff) | |
download | xmr-stak-98c95315b3b48d29477b808134e574fbf25ad698.zip xmr-stak-98c95315b3b48d29477b808134e574fbf25ad698.tar.gz |
refactor scratchpad creation
Use the maximum scratchpad size from before and after the fork.
Diffstat (limited to 'xmrstak/backend/cpu/autoAdjust.hpp')
-rw-r--r-- | xmrstak/backend/cpu/autoAdjust.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xmrstak/backend/cpu/autoAdjust.hpp b/xmrstak/backend/cpu/autoAdjust.hpp index 79c0fc2..579bf48 100644 --- a/xmrstak/backend/cpu/autoAdjust.hpp +++ b/xmrstak/backend/cpu/autoAdjust.hpp @@ -31,7 +31,10 @@ public: bool printConfig() { - const size_t hashMemSizeKB = cn_select_memory(::jconf::inst()->GetMiningAlgo()) / 1024u; + const size_t hashMemSizeKB = std::max( + cn_select_memory(::jconf::inst()->GetMiningAlgo()), + cn_select_memory(::jconf::inst()->GetMiningAlgoRoot()) + ) / 1024u; const size_t halfHashMemSizeKB = hashMemSizeKB / 2u; configEditor configTpl{}; |