aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus.amongus@gmail.com>2013-03-27 22:50:04 -0500
committerDavid Barksdale <amatus.amongus@gmail.com>2013-03-27 22:50:04 -0500
commitcc439de3a7a7199d8aa5bb7e37c38e07a743f4de (patch)
tree8ca019f23c1f0c89dc757577f7494cc7e1ddc81a
parent3c51c7107674e3fb62734d6fe80405db5484ee5e (diff)
Force work_restart to be 128-byte aligned.HEADcell-be-optimizations
This fixes a bug on my system where mfc_get was failing on work_restart_pointer because it was not 128-byte aligned.
-rw-r--r--cpu-miner.c4
1 files changed, 2 insertions, 2 deletions
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));