diff --git a/CraftBukkit-Patches/0079-Warn-if-PermGen-may-be-insufficient.patch b/CraftBukkit-Patches/0079-Warn-if-PermGen-may-be-insufficient.patch index 0391cf5d3..334cf801c 100644 --- a/CraftBukkit-Patches/0079-Warn-if-PermGen-may-be-insufficient.patch +++ b/CraftBukkit-Patches/0079-Warn-if-PermGen-may-be-insufficient.patch @@ -1,11 +1,11 @@ -From a860de9391355dcef67a2f679c316542a5d97608 Mon Sep 17 00:00:00 2001 +From 4f38a35da6cf609f852bae50e5b9102c21f71ddf Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 23 Dec 2013 14:07:41 +1100 Subject: [PATCH] Warn if PermGen may be insufficient diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 8d127fb..062dbec 100644 +index 8d127fb..008e037 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -155,6 +155,22 @@ public class Main { @@ -22,7 +22,7 @@ index 8d127fb..062dbec 100644 + maxPermGen <<= 10 * ("kmg".indexOf( Character.toLowerCase( s.charAt( s.length() - 1 ) ) ) ); + } + } -+ if ( maxPermGen < (128<<10) ) // 128mb ++ if ( Float.parseFloat( System.getProperty( "java.class.version" ) ) < 52 && maxPermGen < ( 128 << 10 ) ) // 128mb + { + System.out.println( "Warning, your max perm gen size is not set or less than 128mb. It is recommended you restart Java with the following argument: -XX:MaxPermSize=128M" ); + System.out.println( "Please see http://www.spigotmc.org/wiki/changing-permgen-size/ for more details and more in-depth instructions." );