To make things more complex, Java memory is separated into two different regions. These regions are called Heap space and Permgen (for Permanent Generation): The size of those regions is set during the Java Virtual Machine (JVM) launch and can be customized by specifying JVM parameters -Xmx and -XX:MaxPermSize.