Use new method to set affinity.
This commit is contained in:
parent
c1800094d0
commit
9ce9147dad
16 changed files with 82 additions and 82 deletions
|
@ -29,16 +29,16 @@
|
|||
#include "Platform.h"
|
||||
|
||||
|
||||
char *Platform::m_defaultConfigName = nullptr;
|
||||
char *Platform::m_userAgent = nullptr;
|
||||
char Platform::m_defaultConfigName[520] = { 0 };
|
||||
xmrig::c_str Platform::m_userAgent;
|
||||
|
||||
|
||||
const char *Platform::defaultConfigName()
|
||||
{
|
||||
size_t size = 520;
|
||||
|
||||
if (m_defaultConfigName == nullptr) {
|
||||
m_defaultConfigName = new char[size];
|
||||
if (*m_defaultConfigName) {
|
||||
return m_defaultConfigName;
|
||||
}
|
||||
|
||||
if (uv_exepath(m_defaultConfigName, &size) < 0) {
|
||||
|
@ -58,5 +58,6 @@ const char *Platform::defaultConfigName()
|
|||
}
|
||||
}
|
||||
|
||||
*m_defaultConfigName = '\0';
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue