mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-22 15:32:24 +00:00
Update miner.cpp
1. Added support for scratchpad memory allocation.
This commit is contained in:
parent
72643c47da
commit
5fcac268b7
1 changed files with 4 additions and 1 deletions
|
@ -23,7 +23,8 @@ using namespace epee;
|
|||
#include "miner.h"
|
||||
|
||||
|
||||
|
||||
extern "C" void slow_hash_allocate_state();
|
||||
extern "C" void slow_hash_free_state();
|
||||
namespace cryptonote
|
||||
{
|
||||
|
||||
|
@ -320,6 +321,7 @@ namespace cryptonote
|
|||
difficulty_type local_diff = 0;
|
||||
uint32_t local_template_ver = 0;
|
||||
block b;
|
||||
slow_hash_allocate_state();
|
||||
while(!m_stop)
|
||||
{
|
||||
if(m_pausers_count)//anti split workaround
|
||||
|
@ -368,6 +370,7 @@ namespace cryptonote
|
|||
nonce+=m_threads_total;
|
||||
++m_hashes;
|
||||
}
|
||||
slow_hash_free_state();
|
||||
LOG_PRINT_L0("Miner thread stopped ["<< th_local_index << "]");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue