What is the size of the reference variable in java

What is the size of reference variables in java? I am pretty sure that it will not depend on architecture or is it? Does it have any resemblance to the concept of pointers in C? I try, but cannot get a convincing answer.

+9
java core
Jul 23 '13 at 15:18
source share
1 answer

The amount of memory used by the link depends on several parameters:

  • on a 32-bit JVM, it will be 32 bits
  • on a 64-bit JVM, there may be 32 or 64 bits, depending on the configuration. For example, in a hot spot, compressed default object pointers are compressed , and the link size is 32 bits. If you disable the option with -XX:-UseCompressedOops , they will use 64 bits.
+12
Jul 23 '13 at 15:20
source share



All Articles