fix getMemorySizeInBytes in SparseMultiArrayOrdinals

This commit is contained in:
Simon Willnauer 2013-02-01 11:09:09 +01:00
parent 45b2bff8da
commit c18ae4a194
1 changed files with 1 additions and 3 deletions

View File

@ -76,9 +76,7 @@ public final class SparseMultiArrayOrdinals implements Ordinals {
@Override
public long getMemorySizeInBytes() {
if (size == -1) {
long size = 0;
size += RamUsage.NUM_BYTES_ARRAY_HEADER;
this.size = pool.getMemorySizeInBytes();
size = (RamUsage.NUM_BYTES_ARRAY_HEADER + (RamUsage.NUM_BYTES_INT * lookup.length)) + pool.getMemorySizeInBytes();
}
return size;
}