Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ public long getEstimatedSize()
currentPageBuilder.getRetainedSizeInBytes() +
Comment thread
Dith3r marked this conversation as resolved.
Outdated
Comment thread
Dith3r marked this conversation as resolved.
Outdated
sizeOf(groupIdsByHash) +
sizeOf(rawHashByHashPosition) +
preallocatedMemoryInBytes;
preallocatedMemoryInBytes +
(dictionaryLookBack != null ? dictionaryLookBack.getRetainedSizeInBytes() : 0);
}

@Override
Expand Down Expand Up @@ -543,6 +544,7 @@ private int registerGroupId(HashGenerator hashGenerator, Page page, int position

private static final class DictionaryLookBack
{
private static final int INSTANCE_SIZE = toIntExact(ClassLayout.parseClass(DictionaryLookBack.class).instanceSize());
Comment thread
Dith3r marked this conversation as resolved.
Outdated
private final Block dictionary;
private final int[] processed;

Expand Down Expand Up @@ -572,6 +574,13 @@ public void setProcessed(int position, int groupId)
{
processed[position] = groupId;
}

public long getRetainedSizeInBytes()
{
return INSTANCE_SIZE +
sizeOf(processed) +
dictionary.getRetainedSizeInBytes();
}
}

@VisibleForTesting
Expand Down