mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 18:11:05 +00:00
Fixed compile warnings.
This commit is contained in:
parent
f7dcfffdb1
commit
48545c5916
4 changed files with 3 additions and 14 deletions
|
@ -41,8 +41,7 @@ constexpr size_t pageSize = 2 * 1024 * 1024;
|
||||||
} // namespace xmrig
|
} // namespace xmrig
|
||||||
|
|
||||||
|
|
||||||
xmrig::MemoryPool::MemoryPool(size_t size, bool hugePages, uint32_t node) :
|
xmrig::MemoryPool::MemoryPool(size_t size, bool hugePages, uint32_t node)
|
||||||
m_size(size)
|
|
||||||
{
|
{
|
||||||
if (!size) {
|
if (!size) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -52,7 +52,6 @@ protected:
|
||||||
void release(uint32_t node) override;
|
void release(uint32_t node) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t m_size = 0;
|
|
||||||
size_t m_refs = 0;
|
size_t m_refs = 0;
|
||||||
size_t m_offset = 0;
|
size_t m_offset = 0;
|
||||||
VirtualMemory *m_memory = nullptr;
|
VirtualMemory *m_memory = nullptr;
|
||||||
|
|
|
@ -34,15 +34,6 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
|
||||||
|
|
||||||
|
|
||||||
constexpr size_t pageSize = 2 * 1024 * 1024;
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace xmrig
|
|
||||||
|
|
||||||
|
|
||||||
xmrig::NUMAMemoryPool::NUMAMemoryPool(size_t size, bool hugePages) :
|
xmrig::NUMAMemoryPool::NUMAMemoryPool(size_t size, bool hugePages) :
|
||||||
m_hugePages(hugePages),
|
m_hugePages(hugePages),
|
||||||
m_nodeSize(std::max<size_t>(size / Cpu::info()->nodes(), 1)),
|
m_nodeSize(std::max<size_t>(size / Cpu::info()->nodes(), 1)),
|
||||||
|
|
|
@ -46,7 +46,7 @@ xmrig::RxQueue::RxQueue(IRxListener *listener) :
|
||||||
|
|
||||||
uv_async_init(uv_default_loop(), m_async, [](uv_async_t *handle) { static_cast<RxQueue *>(handle->data)->onReady(); });
|
uv_async_init(uv_default_loop(), m_async, [](uv_async_t *handle) { static_cast<RxQueue *>(handle->data)->onReady(); });
|
||||||
|
|
||||||
m_thread = std::move(std::thread(&RxQueue::backgroundInit, this));
|
m_thread = std::thread(&RxQueue::backgroundInit, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ void xmrig::RxQueue::backgroundInit()
|
||||||
|
|
||||||
m_storage->init(item.seed, item.threads, item.hugePages);
|
m_storage->init(item.seed, item.threads, item.hugePages);
|
||||||
|
|
||||||
lock = std::move(std::unique_lock<std::mutex>(m_mutex));
|
lock = std::unique_lock<std::mutex>(m_mutex);
|
||||||
|
|
||||||
if (m_state == STATE_SHUTDOWN || !m_queue.empty()) {
|
if (m_state == STATE_SHUTDOWN || !m_queue.empty()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue