Can you estimate how much the heap will be increased by Java?
This is probably a not quite correct formulated question from a newbie but I hope you can help.
I'm wondering if there is possible to estimate how the heap will be increased by Java in order to keep the -XX:MinHeapFreeRation=40
(default value) percent of the heap free?
More concrete:
If my heap has allocated/occupies 300 MB that means that 开发者_运维技巧the JVM must always keep 40%*300 = 120 MB free. Let's say that I have a memory leak and the GC doesn't help in this case. So, when my free heap space is in danger to drop under 120 MB, with which amount Java will increase the heap allocated memory? 20 MB, 40 MB? I suppose it depends on the system and the current state of the system. But let's say that my app is the only one that's running.Can someone help? Thanks.
I suppose the size by which the heap grows is implementation specific. But you can always limit the size upto which the heap can grow by using the XX:MaxPermSize parameter.
精彩评论