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

            <2006年12月>
            262728293012
            3456789
            10111213141516
            17181920212223
            24252627282930
            31123456

            常用鏈接

            留言簿(7)

            隨筆檔案

            最新隨筆

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            国产亚洲美女精品久久久2020| 久久久久99精品成人片直播| 国产精品热久久毛片| 色综合久久88色综合天天| 精品99久久aaa一级毛片| 日韩电影久久久被窝网| 一本一本久久A久久综合精品| AAA级久久久精品无码片| www.久久99| 性做久久久久久免费观看| 99国产欧美精品久久久蜜芽 | 欧美一区二区三区久久综| 狠狠色婷婷综合天天久久丁香| 久久综合九色综合久99| avtt天堂网久久精品| 精品国产青草久久久久福利| 99久久精品免费看国产一区二区三区 | 久久久久国产精品| 久久精品国产亚洲av麻豆蜜芽 | 色婷婷久久综合中文久久一本| 精品国产VA久久久久久久冰| 久久婷婷是五月综合色狠狠| 久久e热在这里只有国产中文精品99| 久久久久成人精品无码中文字幕| 亚洲国产成人精品91久久久 | 欧美亚洲国产精品久久久久| 欧美777精品久久久久网| 无码国内精品久久人妻蜜桃| 99久久香蕉国产线看观香| 狠狠人妻久久久久久综合| 亚洲嫩草影院久久精品| 青青青青久久精品国产| 久久精品国产亚洲AV高清热| 午夜人妻久久久久久久久| 婷婷国产天堂久久综合五月| 一级做a爰片久久毛片免费陪| 久久久久噜噜噜亚洲熟女综合| 国产精品免费久久久久电影网| 亚洲国产精品婷婷久久| 久久久久国产精品麻豆AR影院| 66精品综合久久久久久久|