Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Avoid passing – XX:+UseCompressedOops

  1. #1
    Member
    Join Date
    Nov 2017
    Location
    USA
    Posts
    137
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Avoid passing – XX:+UseCompressedOops

    Since we are analyzing thousands of Garbage Collection logs every single day through our GCeasy tool, we are noticing several java applications still continuing to use ‘-XX:+UseCompressedOops’ JVM argument. Actually, it’s not required to pass ‘-XX:+UseCompressedOops’ JVM argument if you are running in Java SE 6 update 23 and later. Compressed oops is supported and enabled by default in Java SE 6u23 and later versions.

    “OOP” means Ordinary Object Pointer. It means a managed pointer to an object. An OOP is usually the same size as a native machine pointer, which means an OOP is 64 bits on a 64-bit operating system and 32 bits on a 32-bit operating system.

    In a 32-bit operating system, JVM can address only up to 4GB (i.e., 2 ^ 32) memory. To manage larger amounts of memory, the JVM needs to run with 64-bit OOP, which can manage 18.5 Exabytes (i.e., 2 ^ 64 bytes). Very large size :-). Actually, there aren’t any servers in the world which has so much memory.

    What this means is that for a twice as big address, a much larger memory area can be addressed. But this doesn’t comes at ‘free of cost’. When you switch from a 32-bit JVM to a 64-bit JVM, you will notice the loss of available memory by 1.5 times due to larger addresses. To fix this problem, JVM developers invented ‘Compressed Oops’ feature. More details about this compressed OOPs can be found here

    To activate this feature, you were required to pass ‘-XX:+UseCompressedOops’ JVM argument. However, starting from Java SE 6u23 and later versions, the use of compressed oops is made as default. Thus you don’t need to pass this flag explicitly anymore.

  2. #2
    Junior Member
    Join Date
    Jan 2020
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Avoid passing – XX:+UseCompressedOops

    Hello, I don't have enough information regarding XX:+UseCompressedOops. I want to know that should I avoid passing it or not. So, I was searching for the information online and I am glad I have found your post while reading PapersOwl reviews online. I am very much thankful to you for explaining to us about XX:+UseCompressedOops. You have explained it very well and also it is easy for me to understand your post.

Similar Threads

  1. Try to avoid -XX:+UseGCLogFileRotation
    By Ram Lakshmanan in forum Java Programming Tutorials
    Replies: 0
    Last Post: April 4th, 2019, 12:44 AM
  2. Replies: 3
    Last Post: February 9th, 2012, 01:04 PM
  3. HOW TO AVOID JAR,CLASS FILE HACKING
    By huwijk in forum Java Theory & Questions
    Replies: 5
    Last Post: January 30th, 2012, 08:04 AM
  4. What is the best way to avoid duplicating code?
    By Kerr in forum Object Oriented Programming
    Replies: 9
    Last Post: December 1st, 2011, 09:24 AM
  5. How to avoid the Deadlock in the below program
    By murali1253 in forum Threads
    Replies: 0
    Last Post: April 15th, 2010, 05:35 PM