From eb0ae9e711397a46f7777629b3825584f1998266 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 10 Apr 2020 14:11:37 +0200 Subject: [PATCH] Move the memory barrier to the allocation loop --- driver/others/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driver/others/memory.c b/driver/others/memory.c index 1af547fb2..1218de9d3 100644 --- a/driver/others/memory.c +++ b/driver/others/memory.c @@ -2716,6 +2716,7 @@ void *blas_memory_alloc(int procpos){ #if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP) LOCK_COMMAND(&alloc_lock); #endif + WMB; do { #if defined(USE_OPENMP) if (!memory[position].used) { @@ -2740,7 +2741,7 @@ void *blas_memory_alloc(int procpos){ #ifdef DEBUG printf(" Position -> %d\n", position); #endif -WMB; +// WMB; not sure if this is required here ? memory[position].used = 1; #if (defined(SMP) || defined(USE_LOCKING)) && !defined(USE_OPENMP) UNLOCK_COMMAND(&alloc_lock);