IDEA-144670 IDEA hangs after I tried restart debugging test
authorMaxim.Mossienko <Maxim.Mossienko@jetbrains.com>
Thu, 3 Sep 2015 08:33:11 +0000 (10:33 +0200)
committerMaxim.Mossienko <Maxim.Mossienko@jetbrains.com>
Thu, 3 Sep 2015 08:57:12 +0000 (10:57 +0200)
platform/util/src/com/intellij/util/io/ResizeableMappedFile.java

index def305e1897e5407f38b84523be36fcb553bbb65..e06019398051152aa27e7b2050172d6e7ebcccdf 100644 (file)
@@ -98,7 +98,7 @@ public class ResizeableMappedFile implements Forceable {
   private void expand(final long max) {
     long realSize = realSize();
     if (max <= realSize) return;
-    long suggestedSize = realSize + 1;
+    long suggestedSize = Math.max(realSize + 1, 2); // suggestedSize should increase with int multiplication on 1.625 factor
 
     while (max > suggestedSize) {
       long newSuggestedSize = (suggestedSize * 13) >> 3;