示例#1
0
 /** 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;
   }
 }
示例#2
0
 /** 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();
 }