Le Fri, 14 Dec 2012 01:14:04 -0800,
"Gregory P. Smith" <g...@krypto.org> a écrit :
> Yes, see the followup.  My comments before were all misinterpreting
> size_t.
> 
> Same result on x86_64 linux. On a 64-bit platform the 24 byte
> structure now occupies 24 bytes instead of being padded to 32.
> Nice.  On a 32-bit platform it should remain 16 bytes.

But you are losing the 16-byte alignment that the union was precisely
designed to enforce.

> The PyGC_Head union structure is NOT part of the ABI laid out in
> http://www.python.org/dev/peps/pep-0384/ and is accurately excluded
> from the .h file when Py_LIMITED_API is defined so changing this in
> 3.4 should not be a problem.

Not an ABI problem in 3.4 indeed (except that it might break platforms
with strict alignment requirements).

It should be noted that the GC head isn't part of standard atomic types
(int, float, str...), so the memory gain will not be very noticeable
IMO.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to