From cc439de3a7a7199d8aa5bb7e37c38e07a743f4de Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Wed, 27 Mar 2013 22:50:04 -0500 Subject: Force work_restart to be 128-byte aligned. This fixes a bug on my system where mfc_get was failing on work_restart_pointer because it was not 128-byte aligned. --- cpu-miner.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpu-miner.c') diff --git a/cpu-miner.c b/cpu-miner.c index 160c1c3..7d378dd 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -910,8 +910,8 @@ int main (int argc, char *argv[]) openlog("cpuminer", LOG_PID, LOG_USER); #endif - work_restart = calloc(opt_n_threads, sizeof(*work_restart)); - if (!work_restart) + if (posix_memalign(&work_restart, 128, + sizeof(*work_restart) * opt_n_threads)) return 1; thr_info = calloc(opt_n_threads + 2, sizeof(*thr)); -- cgit v1.2.3-18-g5258