www.digitalmars.com         C & C++   DMDScript  

D - Min. memory consumption: object vs. dynamic int-array

reply Hans Castorp <Hans_member pathlink.com> writes:
Hi,

is it true that in D the min. memory consumption of an object is equal to a
dynamic int-array (8 byte)?

H.C.
Feb 24 2003
parent Burton Radons <loth users.sourceforge.net> writes:
Hans Castorp wrote:
 is it true that in D the min. memory consumption of an object is equal to a
 dynamic int-array (8 byte)?
There's a correlation, but they have nothing to do with one another. The minimum size of a class instance is caused by the vtable pointer and a monitor used with the synchronized statement. struct values, however, have no hidden fields.
Feb 24 2003