Message206285
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.) |
|
Date |
User |
Action |
Args |
2013-12-16 09:21:19 | vstinner | set | recipients:
+ vstinner, pitrou, skrah, serhiy.storchaka, schwab |
2013-12-16 09:21:19 | vstinner | set | messageid: <1387185679.19.0.407255845372.issue19537@psf.upfronthosting.co.za> |
2013-12-16 09:21:19 | vstinner | link | issue19537 messages |
2013-12-16 09:21:18 | vstinner | create | |
|