What is Heap Memory in Java?
The Heap Memory in Java is used for storing all objects and all shared (global) primitive types (this is NOT the actual server RAM memory).
If your Java program requires a large amount of memory, it’s possible that the virtual machine will begin to throw OutOfMemoryError instances when attempting to instantiate objects. In some cases, this may be the result of a programming error, but in others, it’s simply a result of your program legitimately using more memory than is available. In the later case a simple solution would be for you to upgrade your plan.
We currently offer Private JVM packages with: 32MB, 64MB, 128MB and 256MB of heap memory. We found that if you need more than 256MB of heap memory the best solution would be to obtain a dedicated server where you can allocate as much memory as the actual physical limit of the server. We Recommend: 64MB heap for all standard applications/sites.
You can start with 32MB and if you experience out of memory errors upgrade to 64MB or 128MB.