Force GC before memory report.

This commit is contained in:
MobiusDevelopment
2020-01-27 00:41:13 +00:00
parent 162e956a4c
commit 71b3889a87

View File

@@ -505,13 +505,14 @@ public class GameServer
LOGGER.info("L2Walker protection actived.");
}
System.gc();
Util.printSection("Info");
LOGGER.info("Maximum Numbers of Connected Players: " + Config.MAXIMUM_ONLINE_USERS);
LOGGER.info("GameServer Started, free memory " + (((Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory()) + Runtime.getRuntime().freeMemory()) / 1048576) + " Mb of " + (Runtime.getRuntime().maxMemory() / 1048576) + " Mb");
LOGGER.info("Used memory: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576) + " MB");
Util.printSection("Status");
System.gc();
LOGGER.info("Server Loaded in " + ((System.currentTimeMillis() - serverLoadStart) / 1000) + " seconds.");
ServerStatus.getInstance();