See how a variable memory size

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

Sponsored Links
See how a variable memory size

Sponsored Links

aisiyukewei
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
wanlinizai
2010-01-01 01:24:10
I do not know wow, you can develop an out Well
sdkjhfkshdjfhsahdfjd
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 ....
stopzy
2010-01-01 01:54:07
eclipse Lane can not see, the more disgusting, this should be the basic functions
sony32167
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
zhangsir1991
2010-01-01 02:10:00
Try instrument related interfaces
z_p73
2010-01-01 02:28:09

learned a point of knowledge.
QQAA123456
2010-01-01 02:46:52
I think there's an Eclipse plug-ins can easily view, their calculation is too much trouble
polaris_rain
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.