|
Compressed Oops |
An "oop", or ordinary object pointer, is a managed pointer to an object. It is normally the same size as a native machine pointer, which means 64 bits on an LP64 system. On an ILP32 system, there is a maximum heap size of somewhat less than 4Gb, which is not enough for many applications. On an LP64 system, though, the heap for any given run may have to be around 1.5 times as large as for the corresponding ILP32 system (assuming the run fits both modes). This is due to the expanded size of managed pointers. Memory is cheap, but these days bandwidth and cache is in short supply, so significantly increasing the size of the heap and only getting just over the 4Gb limit is painful.
Compressed oops represent managed pointers (in many but not all places in the JVM) as 32-bit values which must be scaled by a factor of 8 and added to a 64-bit base address to find the object they refer to. This allows applications to address up to four billion objects (not bytes), or a heap size of up to about 32Gb. At the same time, data structure compactness is competitive with ILP32 mode.
We use the term decode to express the operation by which a 32-bit compressed oop is converted into a 64-bit native address into the managed heap. The inverse operation is encoding.
The Compressed Oops functionality is introduced in JDK7. For more information, see the Compressed Oops weblog.
| Copyright
©2009 Sun Microsystems, Inc. All Rights Reserved.
Feedback |
|