4 ms·
Evidence that it's really "about twice as much"? Much of what any given program stores will be things other than pointers. According to http://www.springerlink
by gjm11 17y ago
Evidence that it's really "about twice as much"? Much of what any given program stores will be things other than pointers.
According to http://www.springerlink.com/content/h6803610u1124354/ http://www.springerlink.com/content/h6803610u1124354/ (actual article is behind a paywall; but the information I'm referring to is on the first page, which is shown) the typical increase in size for Java objects is 40%. I strongly suspect that most programs that use a lot of memory (which are the ones that matter) do so because they have big wodges of non-pointer data (long strings, images, matrices, ...) and therefore get a smaller-than-average size increase, but I have no actual evidence for this.
Anyway, you'd only get a 2x increase if every single byte of memory used by your program were either a pointer or an integer that changed from 32 to 64 bits on switching to 64-bit code (e.g., a long in C or C++, for gcc at least). That's gotta be far from the truth.