You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2012/03/23 22:05:05 UTC

svn commit: r1304598 - /lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java

Author: uschindler
Date: Fri Mar 23 21:05:04 2012
New Revision: 1304598

URL: http://svn.apache.org/viewvc?rev=1304598&view=rev
Log:
LUCENE-3867: Restore Javadocs lost while merging Dawid's patch

Modified:
    lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java

Modified: lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java?rev=1304598&r1=1304597&r2=1304598&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java (original)
+++ lucene/dev/branches/branch_3x/lucene/core/src/java/org/apache/lucene/util/RamUsageEstimator.java Fri Mar 23 21:05:04 2012
@@ -26,6 +26,18 @@ import java.util.*;
 /**
  * Estimates the size (memory representation) of Java objects.
  * 
+ * <p>NOTE: Starting with Lucene 3.6, creating instances of this class
+ * is deprecated. If you still do this, please note, that instances of
+ * {@code RamUsageEstimator} are not thread-safe!
+ * It is also deprecated to enable checking of String intern-ness,
+ * the new static method no longer allow to do this. Interned strings
+ * will be counted as any other object and count for memory usage.
+ * 
+ * <p>In Lucene 3.6, custom {@code MemoryModel}s were completely
+ * removed. The new implementation is now using Hotspot&trade; internals
+ * to get the correct scale factors and offsets for calculating
+ * memory usage.
+ * 
  * @see #sizeOf(Object)
  * @see #shallowSizeOf(Object)
  * @see #shallowSizeOfInstance(Class)