Search code examples
javajava-7windows-7-x64eclipse-keplerpermgen

How Is the Default Max Permgen Size Defined:


My understanding from what documentation I can find and StackOverflow questions I can find is that the default max permgen size is 64MB.

I am running an application out of Eclipse Kepler x86, Windows 7 x64, Java 7 with no -XX:MaxPermSize flags set. The application maxes out at ~82 MB before a Permgen OutOfMemory error. I do not understand where this ~82 MB number is coming from. A reference to up-to-date technical documentation on how this default max perm gen size is derived would be most appreciated.

Note: This is not a question on how to debug/fix PermGen OutOfMemoryErrors.


Solution

  • You are running a 64bit environment, which has a larger permgen default then the 32bit jre's. You get 30% more permgen, which is around 83 Megs, which in turn matches your values.

    This is also documented at Oracle's VM param page.

    Oracle VM Params