git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1439918 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-01-29 14:52:41 +00:00
parent fa35092734
commit 2212440b3b
1 changed files with 1 additions and 0 deletions

View File

@ -160,6 +160,7 @@ public class AppendingLongBuffer {
* Return the number of bytes used by this instance. * Return the number of bytes used by this instance.
*/ */
public long ramBytesUsed() { public long ramBytesUsed() {
// TODO: this is called per-doc-per-norms/dv-field, can we optimize this?
long bytesUsed = RamUsageEstimator.alignObjectSize( long bytesUsed = RamUsageEstimator.alignObjectSize(
RamUsageEstimator.NUM_BYTES_OBJECT_HEADER RamUsageEstimator.NUM_BYTES_OBJECT_HEADER
+ 3 * RamUsageEstimator.NUM_BYTES_OBJECT_REF // the 3 arrays + 3 * RamUsageEstimator.NUM_BYTES_OBJECT_REF // the 3 arrays