You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/07/24 11:07:41 UTC

svn commit: r1613043 - /lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java

Author: mikemccand
Date: Thu Jul 24 09:07:40 2014
New Revision: 1613043

URL: http://svn.apache.org/r1613043
Log:
LUCENE-5844: use RUE.NUM_BYTES_ARRAY_HEADER instead of 8

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java?rev=1613043&r1=1613042&r2=1613043&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java (original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/util/ArrayUtil.java Thu Jul 24 09:07:40 2014
@@ -28,10 +28,8 @@ import java.util.Comparator;
 
 public final class ArrayUtil {
 
-  /** Maximum length for an array (Integer.MAX_VALUE - 8).  stackoverflow
-   *  consensus seems to be this value and it's also what ArrayList.java
-   *  uses as its limit.  */
-  public static final int MAX_ARRAY_LENGTH = Integer.MAX_VALUE - 8;
+  /** Maximum length for an array (Integer.MAX_VALUE - RamUsageEstimator.NUM_BYTES_ARRAY_HEADER). */
+  public static final int MAX_ARRAY_LENGTH = Integer.MAX_VALUE - RamUsageEstimator.NUM_BYTES_ARRAY_HEADER;
 
   private ArrayUtil() {} // no instance