Move "1gb-pages" option to "randomx" object.

This commit is contained in:
XMRig 2019-12-09 21:42:40 +07:00
parent 558c524e2a
commit 3edaebb4cf
No known key found for this signature in database
GPG key ID: 446A53638BE94409
8 changed files with 46 additions and 26 deletions

View file

@ -34,7 +34,6 @@ namespace xmrig {
static const char *kEnabled = "enabled";
static const char *kHugePages = "huge-pages";
static const char *kOneGbPages = "1gb-pages";
static const char *kHwAes = "hw-aes";
static const char *kMaxThreadsHint = "max-threads-hint";
static const char *kMemoryPool = "memory-pool";
@ -69,7 +68,6 @@ rapidjson::Value xmrig::CpuConfig::toJSON(rapidjson::Document &doc) const
obj.AddMember(StringRef(kEnabled), m_enabled, allocator);
obj.AddMember(StringRef(kHugePages), m_hugePages, allocator);
obj.AddMember(StringRef(kOneGbPages), m_oneGbPages, allocator);
obj.AddMember(StringRef(kHwAes), m_aes == AES_AUTO ? Value(kNullType) : Value(m_aes == AES_HW), allocator);
obj.AddMember(StringRef(kPriority), priority() != -1 ? Value(priority()) : Value(kNullType), allocator);
obj.AddMember(StringRef(kMemoryPool), m_memoryPool < 1 ? Value(m_memoryPool < 0) : Value(m_memoryPool), allocator);
@ -123,7 +121,6 @@ void xmrig::CpuConfig::read(const rapidjson::Value &value)
if (value.IsObject()) {
m_enabled = Json::getBool(value, kEnabled, m_enabled);
m_hugePages = Json::getBool(value, kHugePages, m_hugePages);
m_oneGbPages = Json::getBool(value, kOneGbPages, m_oneGbPages);
m_limit = Json::getUint(value, kMaxThreadsHint, m_limit);
m_yield = Json::getBool(value, kYield, m_yield);

View file

@ -54,7 +54,6 @@ public:
inline bool isEnabled() const { return m_enabled; }
inline bool isHugePages() const { return m_hugePages; }
inline bool isOneGbPages() const { return m_oneGbPages; }
inline bool isShouldSave() const { return m_shouldSave; }
inline bool isYield() const { return m_yield; }
inline const Assembly &assembly() const { return m_assembly; }
@ -74,7 +73,6 @@ private:
Assembly m_assembly;
bool m_enabled = true;
bool m_hugePages = true;
bool m_oneGbPages = false;
bool m_shouldSave = false;
bool m_yield = true;
int m_memoryPool = 0;