You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2011/08/08 21:28:28 UTC

svn commit: r1155066 - /xerces/java/trunk/src/org/apache/xerces/util/SoftReferenceSymbolTable.java

Author: mrglavas
Date: Mon Aug  8 19:28:28 2011
New Revision: 1155066

URL: http://svn.apache.org/viewvc?rev=1155066&view=rev
Log:
Memory usage improvement. The fBuckets field in the base class isn't used so make the array as small as possible.

Modified:
    xerces/java/trunk/src/org/apache/xerces/util/SoftReferenceSymbolTable.java

Modified: xerces/java/trunk/src/org/apache/xerces/util/SoftReferenceSymbolTable.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/util/SoftReferenceSymbolTable.java?rev=1155066&r1=1155065&r2=1155066&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/util/SoftReferenceSymbolTable.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/util/SoftReferenceSymbolTable.java Mon Aug  8 19:28:28 2011
@@ -65,9 +65,12 @@ public class SoftReferenceSymbolTable ex
      */
     public SoftReferenceSymbolTable(int initialCapacity, float loadFactor) {
         /*
-         * Not calling super() because we don't want to initialize the Entry buckets
-         * used by the base class.
+         * The Entry buckets in the base class are not used by this class.
+         * We call super() with 1 as the initial capacity to minimize the
+         * memory used by the field in the base class.
          */
+        super(1, loadFactor);
+        
         if (initialCapacity < 0) {
             throw new IllegalArgumentException("Illegal Capacity: " + initialCapacity);
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org