title: C++/compilation : is it possible to set the size of the vptr (global vtable + 2 bytes index)
body: <p>I posted recently a question about the memory overhead due to virtuality in C++. The answers allow me to understand how vtable and vptr works.
  My problem is the following : I work on supercomputers, I have billions of some objects and consequently I have to care about the memory overhead due to virtuality. After some measures, when I use classes with virtual functions, each derived object has its 8-byte vptr. This is not negligible at all.</p>
  
  <p>I wonder if intel icpc or g++ have some configuration/option/parameters, to use "global" vtables and indexes with adjustable precision instead of vptr. Because a such thing would allow me to use 2-bytes index (unsigned short int) instead of 8-bytes vptr for billions of objects (and a good reduction of memory overhead). Is there any way to do that (or something like that) with compilation options ?</p>
  
  <p>Thank you very much.</p>