Skip to content

Commit e2ec44d

Browse files
author
David Gay
committed
Update alignment type to account for Mac OS X requiring 16-byte alignment
for allocated objects.
1 parent bb707d8 commit e2ec44d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libcompat/regions.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
#define ALIGN(x, n) (((x) + ((n) - 1)) & ~((n) - 1))
7676
#define PALIGN(x, n) ((void *)ALIGN((__rcintptr)(x), n))
7777
#ifdef __GNUC__
78-
#define RALIGNMENT __alignof(double)
78+
// Alignment of allocated objects. Mac OS X needs long double (aka 16).
79+
#define RALIGNMENT __alignof(long double)
7980
#define PTRALIGNMENT __alignof(void *)
8081
#define ALIGNMENT_LONG __alignof(unsigned long)
8182
#else

0 commit comments

Comments
 (0)