A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-December/123184.html below:

[Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is no

[Python-Dev] cpython: Using 'long double' to force this structure to be worst case aligned is noMark Dickinson dickinsm at gmail.com
Fri Dec 14 09:42:44 CET 2012
On Fri, Dec 14, 2012 at 7:27 AM, Gregory P. Smith <greg at krypto.org> wrote:
> So changing the definition of the dummy side of the union makes zero
> difference to already compiled code as it (a) doesn't change the structure's
> size and (b) all existing implementations already align these on an 8 byte
> boundary.

It looks to me as though the struct size *is* changed, at least on
some platforms.  Before this commit, I get (OS X 10.6, 64-bit
non-debug build):

Python 3.4.0a0 (default:b4c383f31881+, Dec 14 2012, 08:30:39)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class A(object): pass
...
>>> a = A()
>>> import sys
>>> sys.getsizeof(a)
64


After it:

Python 3.4.0a0 (default:76bc92fb90c1+, Dec 14 2012, 08:33:48)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class A(object): pass
...
>>> a = A()
>>> import sys
>>> sys.getsizeof(a)
56

-- 
Mark
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4