JAL-3477 A bit of refactoring for the better
[jalview.git] / src / jalview / bin / MemoryPercent.java
index 90257d1..3288e66 100644 (file)
@@ -29,39 +29,4 @@ public class MemoryPercent
     return -1;
   }
 
-  public static long memPercentAmount(int percent)
-  {
-    return memPercentAmount((float)percent);
-  }
-  public static long memPercentAmount(float percent)
-  {
-    long memPercentAmount = -1;
-
-    long physicalMem = getPhysicalMemory();
-    if (physicalMem > MemorySetting.applicationMinMemory)
-    {
-      // try and set at least applicationMinMemory and thereafter ensure
-      // leaveFreeMinMemory is left for the OS
-
-      memPercentAmount = (long) ((physicalMem * percent) / 100F);
-
-      // check for memory left for OS
-      if (physicalMem - memPercentAmount < MemorySetting.leaveFreeMinMemory)
-      {
-        memPercentAmount = physicalMem - MemorySetting.leaveFreeMinMemory;
-      }
-
-      // check for minimum application memsize
-      if (memPercentAmount < MemorySetting.applicationMinMemory)
-      {
-        memPercentAmount = MemorySetting.applicationMinMemory;
-      }
-    } else {
-      // not enough memory for application, just try and grab what we can!
-      memPercentAmount = physicalMem;
-    }
-
-    return memPercentAmount;
-  }
-
 }