5.3.2 word considerations

Java virtual machine, is the basic unit of data word (word), its size is determined by the designers of each virtual machine implementation. Word size must be large enough, at least one word is sufficient to hold cell byte, short, int, char value, float, return Address or reference type, while holding the value of the word means long enough or double type. Thus, the designer of the virtual machine to achieve at least a 32-bit word length have to choose or select the more efficient word size. The pointers are typically selected word length of the length of the underlying host platform.

In the Java Virtual Machine Specification, on most of the runtime data area, it is based on the "character" of this abstract concept. For example, with respect to two portions of the stack frames - the local variables and operand stack - are in accordance with "yu" defined. These memory areas can accommodate any type of data value of the virtual machine, when these values ​​into the local variables or the operand to find, it will occupy one or word units.

At runtime, Java programs can not detect the underlying word size of the virtual machine; likewise, word size of the virtual machine will not affect the behavior of the program - it is only the internal properties of the virtual machine implementation.

 

Guess you like

Origin www.cnblogs.com/mongotea/p/11979303.html