Browse Source

Do not enforce DeltaWindow maxMemory when zero.

The maxMemory for a DeltaWindow can be optionally disabled when it is
less than or equal to zero. Respect this configuration when enforcing
the limits on object load.

Change-Id: Ic0f4ffcabf82105f8e690bd0eb5e6be485a313b3
stable-2.3
Colby Ranger 12 years ago
parent
commit
154e3c886b
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java

3
org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/DeltaWindow.java

@ -460,6 +460,9 @@ class DeltaWindow {
} }
private void checkLoadable(DeltaWindowEntry ent, long need) { private void checkLoadable(DeltaWindowEntry ent, long need) {
if (maxMemory <= 0)
return;
int tail = next(resSlot); int tail = next(resSlot);
while (maxMemory < loaded + need) { while (maxMemory < loaded + need) {
DeltaWindowEntry cur = window[tail]; DeltaWindowEntry cur = window[tail];

Loading…
Cancel
Save