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

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            欧美日韩精品久久久久| 久久精品国产亚洲AV无码麻豆| Xx性欧美肥妇精品久久久久久| 久久福利青草精品资源站免费| 日韩美女18网站久久精品| 亚洲成色WWW久久网站| 亚洲伊人久久大香线蕉苏妲己| 亚洲一级Av无码毛片久久精品| 久久久久久久久无码精品亚洲日韩| 国产亚洲精午夜久久久久久| 久久久久久精品免费看SSS| 久久电影网2021| 亚洲成色www久久网站夜月| 国产精品日韩欧美久久综合| 久久香蕉国产线看观看精品yw| 久久精品国产精品亚洲| 国产精品9999久久久久| 国产精品99久久久久久宅男小说| 青青青伊人色综合久久| 久久人妻少妇嫩草AV蜜桃| 久久久久18| 66精品综合久久久久久久| 久久狠狠高潮亚洲精品| 精品伊人久久大线蕉色首页| 久久久综合香蕉尹人综合网| 日本免费久久久久久久网站| 欧美大香线蕉线伊人久久| 一本一本久久A久久综合精品| 久久亚洲中文字幕精品一区四| 国产L精品国产亚洲区久久| 久久91亚洲人成电影网站| AAA级久久久精品无码片| 午夜欧美精品久久久久久久| 人人狠狠综合久久88成人| 伊人久久大香线蕉综合Av| 囯产精品久久久久久久久蜜桃 | 伊人丁香狠狠色综合久久| 国产精品久久成人影院| 久久久久国产一级毛片高清版| 99久久99这里只有免费费精品| 久久久久99精品成人片欧美|