-
Notifications
You must be signed in to change notification settings - Fork 92
Conversation
...don't bother if won't use them due to them already being defined.
This change stops this annoying message being written to stderr (which can cause IntelliJ to freak): ``` Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 ``` See also: https://bugs.openjdk.java.net/browse/JDK-6964458 sbt/sbt-native-packager#203 https://github.com/typesafehub/activator/issues/422
cc @jsuereth ✨ |
(( $codecache < 512 )) || codecache=512 | ||
|
||
local common_opts="-Xms${mem}m -Xmx${mem}m -XX:ReservedCodeCacheSize=${codecache}m" | ||
if [[ "$java_version" < "1.8" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Looks great, thanks for the fixes! |
Don't pass MaxPermSize to Java 8+
Thanks! |
Just got a notification that pointed to this... could I recommend rather than not configuring the size at all, that you configure it via MaxMetaspaceSize? See: https://github.com/typesafehub/activator/pull/506 If you don't configure it, then in Java 8, classloader leaks end up leaking system memory, so over time sbt will cause the system to run out of memory, causing swapping and potentially an eventual system crash (or the Linux OOM killer will start choosing random kittens to kill). Given that sbt's test and run tasks very often run in JVM, and that these very often have classloader leaks, this is something that sbt should take particular care to ensure doesn't happen. |
@jroper points out that class metadata has to go somewhere, and it's new name is 'Metaspace' - not 'PermGen': sbt#66 (comment) http://java.dzone.com/articles/java-8-permgen-metaspace
@jroper points out that class metadata has to go somewhere, and it's new name is 'Metaspace' - not 'PermGen': sbt#66 (comment) http://java.dzone.com/articles/java-8-permgen-metaspace
This change stops this annoying message being written to stderr (which can cause IntelliJ to freak):
See also:
https://bugs.openjdk.java.net/browse/JDK-6964458
sbt/sbt-native-packager#203
https://github.com/typesafehub/activator/issues/422
Re-producing the warning message: