[OpenMP] Align up the size when calling aligned_alloc (#65525)
Based on https://en.cppreference.com/w/c/memory/aligned_alloc, the `size` is supposed to be a multiple of `alignment`, and it is implementation defined behavior if not. We have a non-conformant use in `kmp_barrier.h` when allocating distribute barrier. The size of the barrier is 576 and the alignment is `4*CACHE_LINE`, which is 256 on most systems. Apparently it works perfectly fine for Linux and Intel-based Mac, but not for Apple Silicon based Mac. Fix #63194.
Loading
Please sign in to comment