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 pitrou, schwab, serhiy.storchaka, skrah, vstinner
Date 2013-12-16.09:21:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387185679.19.0.407255845372.issue19537@psf.upfronthosting.co.za>
In-reply-to
Content
If you compile Python with GCC, we can maybe try something with __attribute__ ((aligned (sizeof(void *)))) attribute. The attribute can be used on a structure field. The problem is that we don't care of the alignment of header attributes, only of data, but data is not a field but the data just after the structure.

Or is it possible to GCC to get a structure size aligned on 4 bytes?

For the explicit padding: how do you compute the size of the padding?

How about disabling the fast-path in FASTSEARCH if data is not aligned?

(You might get non-aligned if even if structure is correctly aligned, it may happen if the memory allocator does not align memory blocks. I don't know if Python may get "unaligned" memory blocks.)
History
Date User Action Args
2013-12-16 09:21:19vstinnersetrecipients: + vstinner, pitrou, skrah, serhiy.storchaka, schwab
2013-12-16 09:21:19vstinnersetmessageid: <1387185679.19.0.407255845372.issue19537@psf.upfronthosting.co.za>
2013-12-16 09:21:19vstinnerlinkissue19537 messages
2013-12-16 09:21:18vstinnercreate