/** If tracked offsets may be present, get them so they are ready to be written to the log. */ private void getOffsets() { if (needOffsets) { long[] offsets = trackedSummary.getObsoleteOffsets(); if (offsets != null) { int oldSize = obsoleteOffsets.getExtraMemorySize(); obsoleteOffsets.pack(offsets); int newSize = obsoleteOffsets.getExtraMemorySize(); memBudget.updateTreeMemoryUsage(newSize - oldSize); } needOffsets = false; } }
/** Overrides this method to add space occupied by this object's fields. */ @Override public long getMemorySizeIncludedByParent() { return super.getMemorySizeIncludedByParent() + (MemoryBudget.FILESUMMARYLN_OVERHEAD - MemoryBudget.LN_OVERHEAD) + obsoleteOffsets.getExtraMemorySize(); }