thanks. I'm trying to see how to map this mechanism into C++-land. In theory, what SHOULD be size for a given value instance? The sizeof(value instance) + sizeof(external buffer used by value instance)?
"external buffer" would be for strings and blobs and such. On Jun 4, 2010, at 7:15 AM, Thomas Mueller wrote: > Hi, > >> What are the significance of the DataType memory size values. Is this the >> size of the value instance + the contained data or something else? > > This is used to calculate the current cache size (in memory > representation). I know it's not an exact method, but it's not that > bad. It's almost impossible to calculate the "exact" number, specially > for shared objects (in the object cache). > >> I assume you arrived at them experimentally. > > Yes. Once I saw a way... now I found it. I will add a feature request for: > > Improve object memory size calculation. Use constants for known VMs, > or use reflection to call > java.lang.instrument.Instrumentation.getObjectSize(Object > objectToSize) > > Regards, > Thomas > > -- > You received this message because you are subscribed to the Google Groups "H2 > Database" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/h2-database?hl=en. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
