Add IWorker, Handle, SingleWorker, Worker classes.

This commit is contained in:
XMRig 2017-06-10 07:05:00 +03:00
parent b772349f69
commit 29aa466023
13 changed files with 358 additions and 12 deletions

View file

@ -143,6 +143,10 @@ static BOOL TrySetLockPagesPrivilege() {
bool Mem::allocate(int algo, int threads, bool doubleHash)
{
m_algo = algo;
m_threads = threads;
m_doubleHash = doubleHash;
const int ratio = (doubleHash && algo != Options::ALGO_CRYPTONIGHT_LITE) ? 2 : 1;
const size_t size = MEMORY * (threads * ratio + 1);