Reputation: 1619
i have a Programm with 18 classes. They are working Thread save (checked) have no recursive calls neither do any complex calculation.
But my IDEA always says after some hours
There is not enough memory to perform the requested operation. Pleace increase 'Xmx' setting and restart the IDE for change to take effect.
So I did that. Atm i have no problem.
But still I wonder if I may have a bug there or a Thread is not terminating properly. Since I use WAMP and some other HTTP fuctions I could image that.
Upvotes: 0
Views: 382
Reputation: 226
You can dump the memory with "-XX:+HeapDumpOnOutOfMemoryError" when out of memory error happens; or " -XX:-PrintGC and XX:-PrintGCDetails " for heap/GC information.
Set GC is not enough. You have to tune the GC, saying changing heap size, heap generations and when to do GC to get best performance or to avoid out of memory error. More can read on Link.
You can either get the "jar" file or "class" file to run on other platforms. Or, you can regenerate the class file with source codes on the specified platform.
Upvotes: 1