How to limit the size of the heap in a JVM 8?

1

Until the 7th month, the -Xmx parameter limited the size of the heap, but today at 8 it is not happening.

Today I use the -Xmx200m parameter and my application gets to consume 1.5GB in the heap, I use a lot of short object so practically they stay in eden.

I tried several parameters but none successfully. The question is that my server is dropping some applications out of memory and I would like to limit the heap size of them.

    
asked by anonymous 23.06.2015 / 15:19

1 answer

1

According to documentation , you can do this by using the -XX:MaxHeapSize parameter.

    
23.06.2015 / 16:42