digitalmars.D - Re: A monitor for every object
- bearophile <bearophileHUGS lycos.com> Feb 04 2011
- "Robert Jacques" <sandford jhu.edu> Feb 04 2011
Steven Schveighoffer:Most of the time the extra word isn't noticed because the memory size of a class is usually not exactly a power of 2.
I'd like to know in a normal object oriented program how much memory this design actually wastes. Thank you to you and Kagamin for your answers, bye, bearophile
Feb 04 2011
On Fri, 04 Feb 2011 16:02:55 -0500, bearophile <bearophileHUGS lycos.com> wrote:Steven Schveighoffer:Most of the time the extra word isn't noticed because the memory size of a class is usually not exactly a power of 2.
I'd like to know in a normal object oriented program how much memory this design actually wastes. Thank you to you and Kagamin for your answers, bye, bearophile
1 word per object, assuming a uniform distribution of object sizes. Yes, _most_ objects aren't affected, but the ones that are make up for the difference by using twice the ram.
Feb 04 2011