What does the java -XX: -EliminateAllocations option do?

What does the java -XX: -EliminateAllocations option do? I could not find documentation about this.

+4
source share
2 answers

This key disables "Scalar Replacement Optimization"

Simply put, when an object is identified as non-escaping, the JVM can replace its allocation to the heap with the distribution of its members on the stack, which reduces the lack of stack allocation controlled by the user. Optimization is enabled by default with JDK 6U23 in the hotspot server compiler.

Additional Information.

0
source

HotSpot JIT , . .
-XX:+EliminateAllocations JVM .

0

Source: https://habr.com/ru/post/1649283/


All Articles