Skip to content

Commit 360de46

Browse files
committed
- Update comment.
- Switch `alignment` to `constexpr size_t`.
1 parent 6cff8b2 commit 360de46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openmp/runtime/src/kmp_alloc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ static void bectl(kmp_info_t *th, bget_compact_t compact,
7070
/* Buffer allocation size quantum: all buffers allocated are a
7171
multiple of this size. This MUST be a power of two. */
7272

73-
/* On IA-32 architecture with Linux* OS, malloc() does not
74-
ensure 16 byte alignment */
73+
/* On some architectures, malloc() does not ensure 16 byte alignment,
74+
Solaris/sparc and x86 among them. */
7575

7676
#if KMP_ARCH_X86 || KMP_ARCH_SPARC || !KMP_HAVE_QUAD
7777

@@ -1861,7 +1861,7 @@ typedef struct kmp_mem_desc { // Memory block descriptor
18611861
void *ptr_align; // Pointer to aligned memory, returned
18621862
kmp_allocator_t *allocator; // allocator
18631863
} kmp_mem_desc_t;
1864-
static int alignment = SizeQuant;
1864+
constexpr size_t alignment = SizeQuant;
18651865

18661866
// external interfaces are wrappers over internal implementation
18671867
void *__kmpc_alloc(int gtid, size_t size, omp_allocator_handle_t allocator) {

0 commit comments

Comments
 (0)