Massive refactoring, preparing for cn/2.

This commit is contained in:
XMRig 2018-10-04 15:52:12 +03:00
parent f0b293f650
commit 93d072ff6e
26 changed files with 1259 additions and 458 deletions

View file

@ -21,12 +21,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __PERSISTENT_MEMORY_H__
#define __PERSISTENT_MEMORY_H__
#ifndef XMRIG_PERSISTENT_MEMORY_H
#define XMRIG_PERSISTENT_MEMORY_H
#include <stddef.h>
#include "algo/cryptonight/cryptonight.h"
enum memory_flags {
MEMORY_HUGEPAGES_AVAILABLE = 1,
MEMORY_HUGEPAGES_ENABLED = 2,
@ -44,7 +48,7 @@ extern int persistent_memory_flags;
const char * persistent_memory_allocate();
void persistent_memory_free();
void * persistent_calloc(size_t num, size_t size);
void * create_persistent_ctx(int thr_id);
void create_cryptonight_ctx(struct cryptonight_ctx **ctx, int thr_id);
#endif /* __PERSISTENT_MEMORY_H__ */
#endif /* XMRIG_PERSISTENT_MEMORY_H */