• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            asm, c, c++ are my all
            -- Core In Computer
            posts - 139,  comments - 123,  trackbacks - 0

            ********************************************\
            |????歡迎轉(zhuǎn)載, 但請保留作者姓名和原文鏈接, 祝您進步并共勉!???? |
            \********************************************/


            C++對象模型(10) - 3.2 Data Member Layout

            作者: Jerry Cat
            時間: 2006/11/15
            鏈接:?
            http://m.shnenglu.com/jerysun0818/archive/2006/11/15/15192.html


            3.2 Data Member Layout

            class Point3d {
            public:
            ?? // ...
            private:
            ?? float x;
            ?? static List<Point3d*> *freeList;
            ?? float y;
            ?? static const int chunkSize = 250;
            ?? float z;
            };
            the nonstatic data members are set down in the order of their declaration(按聲明的順序) within each class object (any intervening static data members, such as freeList and chunkSize, are ignored). In our example, then, each Point3d object consists of three float members in order: x, y, z. The static data members are stored in the program's data segment independent of individual class objects.

            The Standard requires within an access section (the private, public, or protected section of a class declaration) only that the members be set down such that "later members have higher addresses within a class object" (Section 9.2 of the Standard). That is, the members are not required to be set down contiguously.(可以不連續(xù)但必須從低到高)

            What might intervene between the declared members? Alignment constraints on the type of a succeeding member may require padding. This is true both of C and C++, and in this case, the member layout of the two languages is in current practice the same.(對齊)

            虛表指針在哪兒? Traditionally, it has been placed after all the explicitly declared members of the class. More recently, it has been placed at the beginning of the class object. The Standard, by phrasing the layout requirement as it does, allows the compiler the freedom to insert these internally generated members anywhere, even between those explicitly declared by the programmer.

            In practice, multiple access sections are concatenated together into one contiguous block in the order of declaration.編譯器幫你同類項合并 No overhead is incurred by the access section specifier or the number of access levels. For example, declaring eight members in one access section or eight separate access sections in practice results in the same-sized objects.

            posted on 2006-11-15 23:34 Jerry Cat 閱讀(1003) 評論(0)  編輯 收藏 引用

            <2006年11月>
            2930311234
            567891011
            12131415161718
            19202122232425
            262728293012
            3456789

            常用鏈接

            留言簿(7)

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            亚洲AV成人无码久久精品老人| 精品国产乱码久久久久久1区2区| 天天影视色香欲综合久久| 久久久久香蕉视频| 99久久国产宗和精品1上映| 久久久久亚洲精品天堂| 久久久WWW成人免费精品| 蜜臀av性久久久久蜜臀aⅴ麻豆| 亚洲狠狠综合久久| 久久久久亚洲AV无码专区体验| 久久久久无码专区亚洲av| 成人国内精品久久久久一区| 亚洲国产精品成人AV无码久久综合影院| 亚洲午夜久久久影院| 亚洲国产一成久久精品国产成人综合| 久久人人爽爽爽人久久久| 久久亚洲sm情趣捆绑调教| 久久精品一区二区三区中文字幕| 精品久久久噜噜噜久久久| 久久婷婷国产剧情内射白浆| 欧美成a人片免费看久久| 久久综合久久综合九色| 97久久超碰成人精品网站| 午夜久久久久久禁播电影| 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 国产午夜精品理论片久久| 97久久精品无码一区二区| 久久精品水蜜桃av综合天堂| 国产色综合久久无码有码| 久久精品天天中文字幕人妻| 久久久老熟女一区二区三区| 久久久久国产精品熟女影院| 久久综合给久久狠狠97色| 亚洲国产精品无码久久一线| 狠狠色丁香久久婷婷综合| 亚洲人成精品久久久久| 色综合久久久久无码专区| 久久久久亚洲AV成人片| 99国产欧美久久久精品蜜芽| 久久精品国产免费一区| 办公室久久精品|