summaryrefslogtreecommitdiff
path: root/Include
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2019-06-03 10:51:32 +0900
committerGregory P. Smith <greg@krypto.org>2019-06-02 18:51:31 -0700
commit8766cb74e186d3820db0a855ccd780d6d84461f7 (patch)
treed7db8e7f31f0bc8a46306b7b9913c25edcf53bc8 /Include
parent9390e98c3ed9eb9fa414030a2feec1926193af94 (diff)
downloadcpython-git-8766cb74e186d3820db0a855ccd780d6d84461f7.tar.gz
[3.7] bpo-27987: align PyGC_Head to alignof(long double) (GH-13335) (GH-13581)
This reverts commit 2156fec1f7a8f9972e90cdbaf404e3fd9eaccb35. Now that https://github.com/python/cpython/commit/1b85f4ec45a5d63188ee3866bd55eb29fdec7fbf is in, this change makes sense.
Diffstat (limited to 'Include')
-rw-r--r--Include/objimpl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 057bb50cbd..0436ba7899 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -255,7 +255,11 @@ typedef union _gc_head {
union _gc_head *gc_prev;
Py_ssize_t gc_refs;
} gc;
- double dummy; /* force worst-case alignment */
+ long double dummy; /* force worst-case alignment */
+ // malloc returns memory block aligned for any built-in types and
+ // long double is the largest standard C type.
+ // On amd64 linux, long double requires 16 byte alignment.
+ // See bpo-27987 for more discussion.
} PyGC_Head;
extern PyGC_Head *_PyGC_generation0;