File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,11 @@ typedef union _gc_head {
255
255
union _gc_head * gc_prev ;
256
256
Py_ssize_t gc_refs ;
257
257
} gc ;
258
- double dummy ; /* force worst-case alignment */
258
+ long double dummy ; /* force worst-case alignment */
259
+ // malloc returns memory block aligned for any built-in types and
260
+ // long double is the largest standard C type.
261
+ // On amd64 linux, long double requires 16 byte alignment.
262
+ // See bpo-27987 for more discussion.
259
263
} PyGC_Head ;
260
264
261
265
extern PyGC_Head * _PyGC_generation0 ;
Original file line number Diff line number Diff line change
1
+ ``PyGC_Head `` structure is aligned to ``long double ``. This is needed to
2
+ GC-ed objects are aligned properly. Patch by Inada Naoki.
You can’t perform that action at this time.
0 commit comments