mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-17 05:41:41 +02:00
speed improvement
Increase the performance for systems without huge memory pages to the performance with huge pages. Use 2 MiB alignment for memory allocations.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user