From: cristy Date: Wed, 30 Jan 2013 22:54:21 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4312 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85769552ff2af7e4d0cb0fc4d7386fac6c8a5726;p=imagemagick --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index e19b627be..1820a2ca7 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -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) diff --git a/MagickCore/resource.c b/MagickCore/resource.c index 0e3c158b6..da772dbdb 100644 --- a/MagickCore/resource.c +++ b/MagickCore/resource.c @@ -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, diff --git a/MagickCore/resource_.h b/MagickCore/resource_.h index 6226e39fd..ed1f7b2d8 100644 --- a/MagickCore/resource_.h +++ b/MagickCore/resource_.h @@ -31,8 +31,8 @@ typedef enum MapResource, MemoryResource, ThreadResource, - TimeResource, - ThrottleResource + ThrottleResource, + TimeResource } ResourceType; #define MagickResourceInfinity MagickULLConstant(~0)