Java Memory Management
801937Sep 30 2010 — edited Sep 30 2010Dear all,
My Java application use HashMap<Integer, byte[]> to store data. I use parameter -Xmx1000M to limit maximum heap size for my application. Maximum item stored in this HashMap is 1000000.
When the application run, HashMap will be set data to maximum size. Memory used by my application is 500MB. After that, the application often set and get data from the HashMap.
The memory used by the application increase slowly to 1000MB. And then reduce to 500MB.
I have some question:
1. Can I set -Xmx600M that my application still run well?
2. I set -Xmx1000M and I don't want my application use heap size larger than 600M. Can I do that?
Thank a lot for support.
Best regards,
QuyenPNQ