I want to use a very large vector storing a data structure inside, to estimate the size of the memory that the virtual machine needs, before executing application, I want to calculate the size for one structure (then multiply for the number of objects in the vector and adding the cost of the vector itself and the cost of storing it inside the vector)

Size of basic data type is know (int, double, etc...) but is there any link to a documento to objects size? (Double, Vector, Hashtable...), and for an object encapsulating this, is there any reference stored in memmory to add the overhead?

How could I accurately calculate the size of this data structure? (and the cost overhead of a Vector with for example 1000 of such structures inside...)

(A link to this kind of information will be helpufull) :-)