From 25529290ca64344c24432d831e561929fa52057e Mon Sep 17 00:00:00 2001 From: michitux Date: Sun, 17 Jun 2007 19:32:38 +0000 Subject: [PATCH] - 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 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3909 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/js/yacysearch.js | 2 +- source/de/anomic/server/serverMemory.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js index 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 translated var DESCRIPTION_STRING = "Loading results..."; // the number of steps of the bar diff --git a/source/de/anomic/server/serverMemory.java b/source/de/anomic/server/serverMemory.java index a813e65b8..c4d7f1744 100644 --- a/source/de/anomic/server/serverMemory.java +++ b/source/de/anomic/server/serverMemory.java @@ -115,7 +115,7 @@ public class serverMemory { *

Be careful with this method as GCs should always be the last measure to take

* * @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 bytes would cause the jvm to call the GC anyway final 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; } }