Author: rfm
Date: Sun Jul  5 13:11:22 2015
New Revision: 38753

URL: http://svn.gna.org/viewcvs/gnustep?rev=38753&view=rev
Log:
tweaks increment/percentage

Modified:
    libs/ec/trunk/EcProcess.m

Modified: libs/ec/trunk/EcProcess.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcProcess.m?rev=38753&r1=38752&r2=38753&view=diff
==============================================================================
--- libs/ec/trunk/EcProcess.m   (original)
+++ libs/ec/trunk/EcProcess.m   Sun Jul  5 13:11:22 2015
@@ -2385,7 +2385,7 @@
       NSInteger     iMax = 0;
       NSInteger     pMax = 0;
 
-      /* Alert if the average has risen above the allowed size.
+      /* Alert because the average has risen above the allowed size.
        */
       [self cmdError: @"Average memory usage grown to %"PRIuPTR"KB",
         memAvge / 1024];
@@ -2423,11 +2423,19 @@
         }
       if (inc > 0)
         {
-          iMax = ((memWarn / (inc * 1024)) + 2) * (inc * 1024);
+          iMax = memWarn + (inc * 1024);
+          if (iMax % 1024)
+            {
+              iMax = (iMax / 1024 + 1) * 1024;
+            }
         }
       if (pct > 0)
         {
-          pMax = (((memWarn * (100 + pct)) / 1024 + 1) * 1024);
+          pMax = (memWarn * (100 + pct)) / 100;
+          if (pMax % 1024)
+            {
+              pMax = (pMax / 1024 + 1) * 1024;
+            }
         }
       memWarn = (iMax > pMax) ? iMax : pMax;
     }


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to