Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- 2 small changes in documentation - hopefully fixed logging of GCs (in order to avoid things like "performed necessary GC, freed 18014398509481565 KB (requested/available/average: 4096 / 1631 / 2957 KB)") with the help of KoH
michitux25529290ca64
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.jsindex a0c7c18a8..f1eca6bd9 100644--- a/htroot/js/yacysearch.js+++ b/htroot/js/yacysearch.js@@ -1,5 +1,5 @@function Progressbar(length, parent) {- // the description, should be translated+ // the description (displayed above the progressbar while loading the results), should be translatedvar DESCRIPTION_STRING = "Loading results...";// the number of steps of the bardiff --git a/source/de/anomic/server/serverMemory.java b/source/de/anomic/server/serverMemory.javaindex a813e65b8..c4d7f1744 100644--- a/source/de/anomic/server/serverMemory.java+++ b/source/de/anomic/server/serverMemory.java@@ -115,7 +115,7 @@ public class serverMemory {* <p><em>Be careful with this method as GCs should always be the last measure to take</em></p>** @param size the requested amount of free memory in bytes- * @param specifies whether a GC should be run even in case former GCs didn't provide enough memory+ * @param force specifies whether a GC should be run even in case former GCs didn't provide enough memory* @return whether enough memory could be freed (or is free) or not*/public static boolean request(final long size, final boolean force) {@@ -123,20 +123,20 @@ public class serverMemory {if (avail >= size) return true;if (log.isFine()) {String t = new Throwable("Stack trace").getStackTrace()[1].toString();- log.logFine(t + " requested " + (size >>> 10) + " KB, got " + (avail >>> 10) + " KB");+ log.logFine(t + " requested " + (size >> 10) + " KB, got " + (avail >> 10) + " KB");}final long avg = getAverageGCFree();if (force || avg == 0 || avg + avail >= size) {// this is only called if we expect that an allocation of <size> bytes would cause the jvm to call the GC anywayfinal long freed = runGC(!force);avail = available();- log.logInfo("performed " + ((force) ? "explicit" : "necessary") + " GC, freed " + (freed >>> 10)- + " KB (requested/available/average: " + (size >>> 10) + " / "- + (avail >>> 10) + " / " + (avg >>> 10) + " KB)");+ log.logInfo("performed " + ((force) ? "explicit" : "necessary") + " GC, freed " + (freed >> 10)+ + " KB (requested/available/average: " + (size >> 10) + " / "+ + (avail >> 10) + " / " + (avg >> 10) + " KB)");return avail >= size;} else {log.logInfo("former GCs indicate to not be able to free enough memory (requested/available/average: "- + (size >>> 10) + " / " + (avail >>> 10) + " / " + (avg >>> 10) + " KB)");+ + (size >> 10) + " / " + (avail >> 10) + " / " + (avg >> 10) + " KB)");return false;}}