1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-01-23 14:52:52 -05:00

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);