Search code examples
javaout-of-memorypermgenfortify

PermGen outofmemory error using Fortify


I am running fortify static code scan.

main\Src>sourceanalyzer  -64 -Xmx6500m -b project -scan -f project.fpr

The JDK is 1.8

java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

After 20 hours, I got PermGen OOM error

[error]: Unexpected exception: java.lang.OutOfMemoryError: PermGen space
^Cendering results               99% [====================]

According to a lot of resource, PermGen is obsolete in Java8.

Any Ideas?


Solution

  • There is also the option to increase PermGen space

    Increase permgen space

    -XX:MaxPermSize=128m
    

    There is also the option to enable garbage collection on PermGen space

    -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled
    

    Nevertheless you should check with HP whether it is actually needed to increase PermGen space, it could also be a bug in the software. PermGen space out of memory errors are often caused by memory leaks.