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

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            性高湖久久久久久久久| 欧美大战日韩91综合一区婷婷久久青草 | 久久伊人精品青青草原日本| 精品久久久久久无码人妻热 | 欧美成a人片免费看久久| 久久久无码精品亚洲日韩京东传媒| 久久婷婷午色综合夜啪| 人妻丰满AV无码久久不卡| 久久免费线看线看| 三级三级久久三级久久| 久久国产精品-国产精品| 亚洲国产天堂久久综合| 色综合久久久久网| AV无码久久久久不卡蜜桃| 国产无套内射久久久国产| 久久国产精品国产自线拍免费 | yy6080久久| 久久av高潮av无码av喷吹| 欧美精品久久久久久久自慰| 久久夜色精品国产| 久久午夜电影网| 久久AV无码精品人妻糸列| 国产精品成人精品久久久 | 72种姿势欧美久久久久大黄蕉| 亚洲а∨天堂久久精品9966| 国产精品久久久久久久久鸭| 影音先锋女人AV鲁色资源网久久| 久久99国产精品成人欧美| 精品国产一区二区三区久久| 无码久久精品国产亚洲Av影片| 狠狠色丁香久久婷婷综合_中 | 久久99国产乱子伦精品免费| 欧美亚洲国产精品久久| 青青久久精品国产免费看| 久久99精品久久久久久野外| 久久高清一级毛片| 久久99国产一区二区三区| 久久99久久无码毛片一区二区| 久久国产香蕉一区精品| 久久久久久国产精品美女| 久久久久99精品成人片|