CVS eclipse/debian/patches
Michael Koch
mkoch-guest at haydn.debian.org
Sun Oct 16 12:57:43 UTC 2005
Update of /cvsroot/pkg-java/eclipse/debian/patches
In directory haydn:/tmp/cvs-serv14754/debian/patches
Modified Files:
eclipse-java-model-cache.dpatch
Log Message:
Updated debian/patches/eclipse-java-model-cache.dpatch to use the upstream
solution.
--- /cvsroot/pkg-java/eclipse/debian/patches/eclipse-java-model-cache.dpatch 2005/10/15 12:29:56 1.1
+++ /cvsroot/pkg-java/eclipse/debian/patches/eclipse-java-model-cache.dpatch 2005/10/16 12:57:43 1.2
@@ -1,6 +1,7 @@
#! /bin/sh -e
##
## DP: Debian specific patch, converted from eclipse-java-model-cache.patch
+## DP: Redone to use the upstream solution.
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
@@ -21,13 +22,17 @@
exit 0
@DPATCH@
---- source-tree/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java.orig 2005-10-03 12:55:58.000000000 +0000
-+++ source-tree/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java 2005-10-03 12:58:23.000000000 +0000
-@@ -58,6 +58,7 @@
+--- source-tree/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java.orig 2005-09-29 12:52:56.000000000 +0000
++++ source-tree/plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelCache.java 2005-10-16 11:13:11.000000000 +0000
+@@ -57,7 +57,10 @@
+
public JavaModelCache() {
// set the size of the caches in function of the maximum amount of memory available
- double ratio = Runtime.getRuntime().maxMemory() / 64000000; // 64000000 is the base memory for most JVM
-+ ratio = Math.min(ratio, 2d);
+- double ratio = Runtime.getRuntime().maxMemory() / 64000000; // 64000000 is the base memory for most JVM
++ long maxMemory = Runtime.getRuntime().maxMemory();
++ // if max memory is infinite, set the ratio to 4d which corresponds to the 256MB that Eclipse defaults to
++ // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=111299)
++ double ratio = maxMemory == Long.MAX_VALUE ? 4d : maxMemory / 64000000; // 64000000 is the base memory for most JVM
this.projectCache = new HashMap(DEFAULT_PROJECT_SIZE); // NB: Don't use a LRUCache for projects as they are constantly reopened (e.g. during delta processing)
this.rootCache = new ElementCache((int) (DEFAULT_ROOT_SIZE * ratio));
this.pkgCache = new ElementCache((int) (DEFAULT_PKG_SIZE * ratio));
More information about the pkg-java-commits
mailing list