summaryrefslogtreecommitdiffstats
path: root/crypto/cryptonight_common.cpp
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-04-21 08:38:04 +0100
committerGitHub <noreply@github.com>2017-04-21 08:38:04 +0100
commit1b56eab73043ce4094e6ee6b3886f169a605a080 (patch)
treefc8bfdbfa457021c0fec0e32eaf43ddb8a028f59 /crypto/cryptonight_common.cpp
parent3190227587e7b696827da3d5585263b4207e3586 (diff)
parentfdcf349cbb4bb52f85f736b69d6d40324d364fc9 (diff)
downloadxmr-stak-1b56eab73043ce4094e6ee6b3886f169a605a080.zip
xmr-stak-1b56eab73043ce4094e6ee6b3886f169a605a080.tar.gz
Merge pull request #77 from psychocrypt/topic-performanceImprovement
speedup systems without huge memory pages
Diffstat (limited to 'crypto/cryptonight_common.cpp')
-rw-r--r--crypto/cryptonight_common.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cryptonight_common.cpp b/crypto/cryptonight_common.cpp
index 6955dc1..bbcff34 100644
--- a/crypto/cryptonight_common.cpp
+++ b/crypto/cryptonight_common.cpp
@@ -114,7 +114,8 @@ cryptonight_ctx* cryptonight_alloc_ctx(size_t use_fast_mem, size_t use_mlock, al
if(use_fast_mem == 0)
{
- ptr->long_state = (uint8_t*)_mm_malloc(MEMORY, 4096);
+ // use 2MiB aligned memory
+ ptr->long_state = (uint8_t*)_mm_malloc(MEMORY, 2*1024*1024);
ptr->ctx_info[0] = 0;
ptr->ctx_info[1] = 0;
return ptr;
OpenPOWER on IntegriCloud