See how a variable memory size

Category: Java SE
2010-01-01 12:57:28

Sponsored Links
See how a variable memory size

Sponsored Links

2010-01-01 01:08:11
simple variables you do not have to analyze?

complex, you can Runtime.getRuntime (). freeMemory () to return the variable declaration and the declaration before the virtual machine's available memory to get
2010-01-01 01:24:10
I do not know wow, you can develop an out Well
2010-01-01 01:43:08
variable memory size it, and it is related to the type of variables ....
type int, then say, 32 machines , then you take up memory 4 bytes in size slightly ....
2010-01-01 01:54:07
eclipse Lane can not see, the more disgusting, this should be the basic functions
2010-01-01 01:58:49
jdk implementation of this type of can not the same memory footprint

example int, java requirement for coding level int occupies 4 bytes, but its underlying implementation can be 64 bytes, 128 bytes
2010-01-01 02:10:00
Try instrument related interfaces
2010-01-01 02:28:09

learned a point of knowledge.
2010-01-01 02:46:52
I think there's an Eclipse plug-ins can easily view, their calculation is too much trouble
2010-01-01 02:59:44
first determine the type of the variable, and then depending on the type you can get variable occupies memory! Java is a cross-platform, nowhere on the platform at the same size it!
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.