Added initial memory pool support.

This commit is contained in:
XMRig 2019-10-07 12:36:40 +07:00
parent c13c83b902
commit 68d77b02d7
17 changed files with 444 additions and 127 deletions

View file

@ -23,15 +23,17 @@
*/
#include <cassert>
#include "backend/cpu/Cpu.h"
#include "core/Controller.h"
#include "backend/cpu/Cpu.h"
#include "core/config/Config.h"
#include "core/Miner.h"
#include "crypto/common/VirtualMemory.h"
#include "net/Network.h"
#include <cassert>
xmrig::Controller::Controller(Process *process) :
Base(process)
{
@ -41,6 +43,8 @@ xmrig::Controller::Controller(Process *process) :
xmrig::Controller::~Controller()
{
delete m_network;
VirtualMemory::destroy();
}
@ -48,7 +52,10 @@ int xmrig::Controller::init()
{
Base::init();
VirtualMemory::init(config()->cpu().isHugePages(), -1);
m_network = new Network(this);
return 0;
}

View file

@ -26,11 +26,12 @@
#define XMRIG_CONFIG_H
#include <stdint.h>
#include <cstdint>
#include "backend/cpu/CpuConfig.h"
#include "base/kernel/config/BaseConfig.h"
#include "base/tools/Object.h"
#include "rapidjson/fwd.h"
@ -46,6 +47,8 @@ class OclConfig;
class Config : public BaseConfig
{
public:
XMRIG_DISABLE_COPY_MOVE(Config);
Config();
~Config() override;