Restore persistent memory.

This commit is contained in:
XMRig 2017-06-10 00:43:23 +03:00
parent 30642881bf
commit c5fbc1a182
5 changed files with 105 additions and 5 deletions

View file

@ -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
};