• <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

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


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

            作者: Jerry Cat
            時間: 2006/11/15
            鏈接:?
            http://www.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.(可以不連續但必須從低到高)

            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 閱讀(1000) 評論(0)  編輯 收藏 引用

            <2006年10月>
            24252627282930
            1234567
            891011121314
            15161718192021
            22232425262728
            2930311234

            常用鏈接

            留言簿(7)

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            色欲综合久久中文字幕网| 青青热久久综合网伊人| 伊人久久大香线蕉av不变影院| 成人久久综合网| 国产叼嘿久久精品久久| 午夜精品久久久久久| 久久久91精品国产一区二区三区 | 久久久久国产一级毛片高清版| 久久成人影院精品777| 久久久精品国产免大香伊 | 午夜精品久久久久久久久| 99精品伊人久久久大香线蕉| 一级a性色生活片久久无少妇一级婬片免费放 | 99久久亚洲综合精品网站| 人妻精品久久久久中文字幕| 久久99精品国产99久久| 久久久久精品国产亚洲AV无码| 99久久精品费精品国产| 国产精品久久久久影视不卡| 国产激情久久久久久熟女老人| 精品国产综合区久久久久久 | 久久久青草青青国产亚洲免观| AV色综合久久天堂AV色综合在| 国产精品久久久久久久app| 狠狠色综合网站久久久久久久| 久久免费线看线看| 久久精品国产精品青草app| av无码久久久久久不卡网站| 久久九九精品99国产精品| 久久久久久久精品成人热色戒| 色99久久久久高潮综合影院| 久久人搡人人玩人妻精品首页| 久久精品国产99国产精品| 久久精品国产亚洲AV不卡| 激情五月综合综合久久69| 精品无码久久久久久久动漫| 国产日韩欧美久久| 久久人妻少妇嫩草AV无码蜜桃| 久久久久香蕉视频| 久久亚洲精品无码aⅴ大香| 国产成人久久精品一区二区三区 |