Profile Image

What is Java Compressed Class Pointers: -XX:-UseCompressedClassPointers?

What is Java Compressed Class Pointers: -XX:-UseCompressedClassPointers? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xx-usecompressedclasspointers

  • x-usecompressedclasspointers

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky


• -XX:-UseCompressedClassPointers
• -XX:+UseCompressedClassPointers


The -XX:-UseCompressedClassPointers flag disables the use of compressed
class pointers. It is only available or relevant on 64-bit JVMs.

This feature is a variant of -XX:-UseCompressedOops except that it relates to
class pointers rather than object pointers. Every Java object has a pointer to
a native data structure outside the Java heap, known as the Klass structure.
Using compressed pointers allows this pointer to the Klass structure to be stored
by each object as a 32-bit number rather than a 64-bit number.

See -XX:-UseCompressedOops for more information on compressed pointers.

The -XX:-UseCompressedClassPointers flag turns off the compressed class
pointers feature. There is little reason ever to do this except if it is suspected to
be the cause of a bug or JVM crash.

The -XX:+UseCompressedClassPointers flag re-enables the use of Compressed Pointers. Where both -XX:-UseCompressedClassPointers and

-XX:+UseCompressedClassPointers have been used on a command line, the
last one takes precedence.


Default Value:

Compressed Class Pointers are enabled by default on Java 1.7 and above when
the maximum heap size (as specified by -Xmx) does not exceed 32 GB.
When compressed object pointers are disabled, either with -XX:-UseCompressedOops
or because the Java heap exceeds 32 GB, compressed class pointers are also
disabled (i.e. as if -XX:-UseCompressedClassPointers had been specified).




Arguments Related to -XX:-UseCompressedClassPointers:

• TODO: link to -Xmx
• TODO: link to -XX:-UseCompressedOops
TODO: link to -XX:ObjectAlignmentInBytes


Related Posts:

• Compressed OOPs in the JVM
• What is Compressed Class Space?

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your
insights will help the entire 10+ million java developer community to develop
one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvm-argument

  • xx-usecompressedclasspointers

  • x-usecompressedclasspointers