Преглед на файлове

Discard the uncompressed delta as soon as its compressed

The DeltaCache will most likely need to copy the compressed delta
into a new buffer in order to compact away the wasted space at the
end caused by over allocation.  Since we don't need the uncompressed
format anymore, null out our only reference to it so the GC can
reclaim this memory if it needs to perform a collection in order
to satisfy the cache's allocation attempt.

Change-Id: I50403cfd2e3001b093f93a503cccf7adab43cc9d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
tags/v0.9.1
Shawn O. Pearce преди 14 години
родител
ревизия
12fe0f2d1e
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1
    0
      org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java

+ 1
- 0
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java Целия файл

@@ -330,6 +330,7 @@ class DeltaWindow {

ZipStream zs = new ZipStream(deflater(), zbuf);
bestDelta.writeTo(zs, null);
bestDelta = null;
int len = zs.finish();

resObj.setCachedDelta(deltaCache.cache(zbuf, len, rawsz));

Loading…
Отказ
Запис