• <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://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.(可以不連續(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)

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            久久久久四虎国产精品| 理论片午午伦夜理片久久| 韩国无遮挡三级久久| 中文字幕亚洲综合久久2| 亚洲国产成人久久一区WWW| 午夜精品久久久久久久久| 亚洲一本综合久久| 久久久久av无码免费网| 99久久免费只有精品国产| 久久午夜夜伦鲁鲁片免费无码影视| 国产高潮国产高潮久久久| 久久精品中文字幕有码| 久久精品a亚洲国产v高清不卡| 久久精品无码av| 久久久久久久亚洲Av无码| 亚洲精品乱码久久久久久蜜桃| 久久99免费视频| 老色鬼久久亚洲AV综合| 久久久久亚洲AV成人网人人网站| 久久精品国产亚洲av影院| 久久婷婷五月综合成人D啪 | 国产成人久久激情91| 中文字幕久久精品| 办公室久久精品| 成人久久综合网| 99久久精品国产麻豆| 久久综合狠狠综合久久综合88| 亚洲精品无码久久不卡| 久久久精品国产亚洲成人满18免费网站| 久久精品人人做人人爽97| 亚洲va久久久噜噜噜久久男同 | 久久亚洲AV无码精品色午夜麻豆| 久久九九久精品国产免费直播| 99久久亚洲综合精品成人| 99热精品久久只有精品| 久久久精品波多野结衣| 久久综合狠狠综合久久97色| 久久免费视频6| 久久久久99这里有精品10| 狠狠色综合网站久久久久久久高清| 久久久久亚洲精品日久生情|