diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-04-20 21:30:59 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-04-20 21:46:19 +0200 |
commit | fdcf349cbb4bb52f85f736b69d6d40324d364fc9 (patch) | |
tree | b9c726b4475508e14f3233cfaee4237928eeaed3 | |
parent | ddfcbd3c4ab9a37c06598a6e4898ed54d2922236 (diff) | |
download | xmr-stak-fdcf349cbb4bb52f85f736b69d6d40324d364fc9.zip xmr-stak-fdcf349cbb4bb52f85f736b69d6d40324d364fc9.tar.gz |
speed improvement
Increase the performance for systems without huge memory pages to the performance with huge pages.
Use 2 MiB alignment for memory allocations.
-rw-r--r-- | crypto/cryptonight_common.cpp | 3 |
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; |