This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients benjamin.peterson, fweimer, gregory.p.smith, methane, nascheme, pitrou, skrah, tgrigg, twouters, vstinner
Date 2019-04-15.11:24:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The x86-64 ABI requires that memory allocated on the heap is aligned to 16 bytes.

On x86-64, glibc malloc(size) aligns on 16 bytes for size >= 16, otherwise align to 8 bytes. So the glibc doesn't respect exactly the ABI. I understand that a compiler will not use instructions which require 16B align on a memory block smaller than 16B, so align to 8B for size < 16B should be fine *in practice*.

Python objects are at least 16B because of PyObject header. Moreover, objects tracked by the GC gets additional 16B header from PyGC_Head.

But pymalloc is also used for PyMem_Malloc() since Python 3.6, and PyMem_Malloc() is used to allocate things which are not PyObject.
Date User Action Args
2019-04-15 11:24:14vstinnersetrecipients: + vstinner, twouters, nascheme, gregory.p.smith, pitrou, benjamin.peterson, methane, skrah, fweimer, tgrigg
2019-04-15 11:24:14vstinnersetmessageid: <>
2019-04-15 11:24:14vstinnerlinkissue27987 messages
2019-04-15 11:24:14vstinnercreate