The memory size of a C++ object instance.

  1.  The accumulated size of its nonstatic data members. The static data memvers, like the member functions, are stored in global space.
  2. Plus any padding due to memory alignment constraints or simple efficiency. The padding exists between the members or the aggreate boundary itself.
  3. Plus any internally generated overhead to support the virtuals.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章