]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Wed, 30 Jan 2013 22:54:21 +0000 (22:54 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Wed, 30 Jan 2013 22:54:21 +0000 (22:54 +0000)
MagickCore/cache.c
MagickCore/resource.c
MagickCore/resource_.h

index e19b627be9b7126c597a6406b801cebe19b3c260..1820a2ca7c2760eb3dddba78529c78fa86cbbb65 100644 (file)
@@ -1494,23 +1494,7 @@ static Cache GetImagePixelCache(Image *image,const MagickBooleanType clone,
   status=MagickTrue;
   LockSemaphoreInfo(image->semaphore);
   if (cpu_throttle == 0)
-    {
-      char
-        *limit;
-
-      /*
-        Set CPU throttle in milleseconds.
-      */
-      cpu_throttle=MagickResourceInfinity;
-      limit=GetEnvironmentValue("MAGICK_THROTTLE");
-      if (limit == (char *) NULL)
-        limit=GetPolicyValue("throttle");
-      if (limit != (char *) NULL)
-        {
-          cpu_throttle=(MagickSizeType) StringToInteger(limit);
-          limit=DestroyString(limit);
-        }
-    }
+    cpu_throttle=GetMagickResourceLimit(ThrottleResource);
   if ((cpu_throttle != MagickResourceInfinity) && ((cycles++ % 32) == 0))
     MagickDelay(cpu_throttle);
   if (time_limit == 0)
index 0e3c158b6ac5b869663a8185092a13fd49909e10..da772dbdb492f2b1a737a658414056c5dd5f85ff 100644 (file)
@@ -106,6 +106,7 @@ static ResourceInfo
     MagickULLConstant(0),
     MagickULLConstant(0),
     MagickULLConstant(0),
+    MagickULLConstant(0),
     MagickULLConstant(3072)*1024*1024,
     MagickULLConstant(1536)*1024*1024,
     MagickULLConstant(3072)*1024*1024,
index 6226e39fd2f75781d4218b2d9953d2d994b8e651..ed1f7b2d8ffaf231a7f246f19b7035e276f51d36 100644 (file)
@@ -31,8 +31,8 @@ typedef enum
   MapResource,
   MemoryResource,
   ThreadResource,
-  TimeResource,
-  ThrottleResource
+  ThrottleResource,
+  TimeResource
 } ResourceType;
 
 #define MagickResourceInfinity  MagickULLConstant(~0)