]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sat, 23 Oct 2010 01:27:25 +0000 (01:27 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sat, 23 Oct 2010 01:27:25 +0000 (01:27 +0000)
magick/resource.c
magick/string.c

index 254c2f3601e25e57b67217cd595a8a4137289102..60f09151997fb1f7183d722ac9f36dabbeddd815 100644 (file)
@@ -104,10 +104,10 @@ static ResourceInfo
     MagickULLConstant(0),
     MagickULLConstant(2048)*1024*1024,
     MagickULLConstant(1536)*1024*1024,
-    MagickULLConstant(8192)*1024*1024,
+    MagickULLConstant(3072)*1024*1024,
     MagickResourceInfinity,
     MagickULLConstant(768),
-    MagickULLConstant(8),
+    MagickULLConstant(4),
     MagickResourceInfinity
   };
 
@@ -259,7 +259,7 @@ MagickExport MagickBooleanType AcquireMagickResource(const ResourceType type,
       break;
   }
   UnlockSemaphoreInfo(resource_semaphore);
-  (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %sB/%sB/%sB",
+  (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s",
     MagickOptionToMnemonic(MagickResourceOptions,(ssize_t) type),
     resource_request,resource_current,resource_limit);
   return(status);
@@ -673,7 +673,9 @@ MagickExport MagickBooleanType ListMagickResourceInfo(FILE *file,
   (void) FormatMagickSize(resource_info.area_limit,MagickFalse,area_limit);
   (void) FormatMagickSize(resource_info.memory_limit,MagickTrue,memory_limit);
   (void) FormatMagickSize(resource_info.map_limit,MagickTrue,map_limit);
-  (void) FormatMagickSize(resource_info.disk_limit,MagickFalse,disk_limit);
+  (void) CopyMagickString(disk_limit,"unlimited",MaxTextExtent);
+  if (resource_info.disk_limit != MagickResourceInfinity)
+    (void) FormatMagickSize(resource_info.disk_limit,MagickFalse,disk_limit);
   (void) CopyMagickString(time_limit,"unlimited",MaxTextExtent);
   if (resource_info.time_limit != MagickResourceInfinity)
     (void) FormatMagickString(time_limit,MaxTextExtent,"%.20g",(double)
@@ -682,7 +684,7 @@ MagickExport MagickBooleanType ListMagickResourceInfo(FILE *file,
     "         Disk    Thread         Time\n");
   (void) fprintf(file,"--------------------------------------------------------"
     "-----------------------\n");
-  (void) fprintf(file,"%4g  %10sB  %10sB  %10sB  %10sB    %6g  %11s\n",(double)
+  (void) fprintf(file,"%4g   %10s   %10s   %10s   %10s    %6g  %11s\n",(double)
     resource_info.file_limit,area_limit,memory_limit,map_limit,disk_limit,
     (double) resource_info.thread_limit,time_limit);
   (void) fflush(file);
@@ -796,7 +798,7 @@ MagickExport void RelinquishMagickResource(const ResourceType type,
       break;
   }
   UnlockSemaphoreInfo(resource_semaphore);
-  (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %sB/%sB/%sB",
+  (void) LogMagickEvent(ResourceEvent,GetMagickModule(),"%s: %s/%s/%s",
     MagickOptionToMnemonic(MagickResourceOptions,(ssize_t) type),
       resource_request,resource_current,resource_limit);
 }
@@ -919,9 +921,9 @@ MagickExport MagickBooleanType ResourceComponentGenesis(void)
 #if defined(PixelCacheThreshold)
   memory=PixelCacheThreshold;
 #endif
-  (void) SetMagickResourceLimit(AreaResource,2UL*memory);
-  (void) SetMagickResourceLimit(MemoryResource,3UL*memory/2UL);
-  (void) SetMagickResourceLimit(MapResource,4UL*memory);
+  (void) SetMagickResourceLimit(AreaResource,6UL*memory/4UL);
+  (void) SetMagickResourceLimit(MemoryResource,1UL*memory);
+  (void) SetMagickResourceLimit(MapResource,2UL*memory);
   limit=GetEnvironmentValue("MAGICK_AREA_LIMIT");
   if (limit == (char *) NULL)
     limit=GetPolicyValue("area");
index 3a361d031ff12c6258c9db6d02faf72ec532c263..dbbd2d3eb1615a32f740799322e3e6171d244d70 100644 (file)
@@ -1049,7 +1049,7 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size,
     length/=bytes;
   for (j=2; j < 12; j++)
   {
-    count=FormatMagickString(format,MaxTextExtent,"%.*g%s",(int) (i+j),length,
+    count=FormatMagickString(format,MaxTextExtent,"%.*g%sB",(int) (i+j),length,
       units[i]);
     if (strchr(format,'+') == (char *) NULL)
       break;