mirror of
https://github.com/xmrig/xmrig.git
synced 2026-01-23 14:52:52 -05:00
Restore persistent memory.
This commit is contained in:
17
src/Mem.h
17
src/Mem.h
@@ -25,7 +25,10 @@
|
||||
#define __MEM_H__
|
||||
|
||||
|
||||
#include "crypto/CryptoNight.h"
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
struct cryptonight_ctx;
|
||||
|
||||
|
||||
class Mem
|
||||
@@ -38,13 +41,23 @@ public:
|
||||
};
|
||||
|
||||
static bool allocate(int algo, int threads, bool doubleHash);
|
||||
static cryptonight_ctx *create(int algo, int threadId, bool doubleHash);
|
||||
static void *calloc(size_t num, size_t size);
|
||||
static void release();
|
||||
|
||||
static inline int flags() { return m_flags; }
|
||||
|
||||
private:
|
||||
static uint8_t *m_memory __attribute__((aligned(16)));
|
||||
static bool m_doubleHash;
|
||||
static int m_algo;
|
||||
static int m_flags;
|
||||
static int m_threads;
|
||||
static size_t m_offset;
|
||||
static uint8_t *m_memory __attribute__((aligned(16)));
|
||||
|
||||
# ifndef XMRIG_NO_AEON
|
||||
static cryptonight_ctx *createLite(int threadId, bool doubleHash);
|
||||
# endif
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user