I am reading the Effective C++ book by Scott Meyers. Regarding new, he mentions the following:
this additional bookkeeping data can more than double the amount
of memory needed for each dynamically allocated object (especially if the class contains no virtual functions).
This is in reference to "new" providing more memory than the size of the class. Now, i'm not able to understand what "bookkeeping" he is referring to, that leads to excess memory allocation. At max, i understand that there would be sizeof(pointer) bytes for the pointer to the vtable. But, i didn't understand what other memory is needed for. Could anyone please explain what this excess memory is needed for?