]> source.dussan.org Git - jgit.git/commitdiff
GC: Trim more EWAHCompressedBitmaps to free unused memory 42/126142/2
authorTerry Parker <tparker@google.com>
Mon, 16 Jul 2018 20:58:30 +0000 (13:58 -0700)
committerTerry Parker <tparker@google.com>
Mon, 16 Jul 2018 21:44:43 +0000 (14:44 -0700)
04b9f4436 fixed places where compressed bitmaps were holding on to their
full buffers, but missed this StoredBitmap.getBitmap() case where a
bitmap is resonstituted from an xor chain.

Change-Id: I7cf75d9e49c18a1a8a880a4df7e821502edc68a4
Signed-off-by: Terry Parker <tparker@google.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java

index 407061fa16c191afbfa296894f84b6afb7b96269..3884180e19571ddcb3cccbd1805f27724592dd41 100644 (file)
@@ -104,6 +104,7 @@ abstract class BasePackBitmapIndex extends PackBitmapIndex {
                                r = xb.xorBitmap.bitmapContainer;
                                if (r instanceof EWAHCompressedBitmap) {
                                        out = out.xor((EWAHCompressedBitmap) r);
+                                       out.trim();
                                        bitmapContainer = out;
                                        return out;
                                }