% September 2002 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
- MagickULLConstant(3072)*1024*1024/sizeof(PixelPacket),
+ MagickULLConstant(3072)*1024*1024,
MagickULLConstant(1536)*1024*1024,
MagickULLConstant(3072)*1024*1024,
MagickResourceInfinity,
}
case ThreadResource:
{
- resource_info.thread+=size;
limit=resource_info.thread_limit;
status=(resource_info.thread_limit == MagickResourceInfinity) ||
((MagickSizeType) resource_info.thread < limit) ?
path=(const char *) GetNextKeyInSplayTree(temporary_resources);
while (path != (const char *) NULL)
{
- (void) remove(path);
+ (void) remove_utf8(path);
path=(const char *) GetNextKeyInSplayTree(temporary_resources);
}
}
static void *DestroyTemporaryResources(void *temporary_resource)
{
- (void) remove((char *) temporary_resource);
+ (void) remove_utf8((char *) temporary_resource);
temporary_resource=DestroyString((char *) temporary_resource);
return((void *) NULL);
}
*p++=portable_filename[c];
}
key=DestroyStringInfo(key);
- file=open(path,O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_NOFOLLOW,S_MODE);
+ file=open_utf8(path,O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_NOFOLLOW,S_MODE);
if ((file >= 0) || (errno != EEXIST))
break;
}
}
case ThreadResource:
{
- resource_info.thread-=size;
(void) FormatMagickSize((MagickSizeType) resource_info.thread,MagickFalse,
resource_current);
(void) FormatMagickSize((MagickSizeType) resource_info.thread_limit,
}
(void) CopyMagickString(cache_path,path,MaxTextExtent);
AppendImageFormat("cache",cache_path);
- (void) remove(cache_path);
- return(remove(path) == 0 ? MagickTrue : MagickFalse);
+ (void) remove_utf8(cache_path);
+ return(remove_utf8(path) == 0 ? MagickTrue : MagickFalse);
}
\f
/*
double
value;
- value=SiPrefixToDouble(string,interval);
+ value=SiPrefixToDoubleInterval(string,interval);
if (value >= (double) MagickULLConstant(~0))
return(MagickULLConstant(~0));
return((MagickSizeType) value);
#if defined(PixelCacheThreshold)
memory=PixelCacheThreshold;
#endif
- (void) SetMagickResourceLimit(AreaResource,2*memory/sizeof(PixelPacket));
+ (void) SetMagickResourceLimit(AreaResource,2*memory);
(void) SetMagickResourceLimit(MemoryResource,memory);
(void) SetMagickResourceLimit(MapResource,2*memory);
limit=GetEnvironmentValue("MAGICK_AREA_LIMIT");
limit=GetPolicyValue("file");
if (limit != (char *) NULL)
{
- (void) SetMagickResourceLimit(FileResource,StringToSizeType(limit,100.0));
+ (void) SetMagickResourceLimit(FileResource,StringToSizeType(limit,
+ 100.0));
limit=DestroyString(limit);
}
(void) SetMagickResourceLimit(ThreadResource,GetOpenMPMaximumThreads());
if (value != (char *) NULL)
resource_info.thread_limit=MagickMin(limit,StringToSizeType(value,
100.0));
- SetOpenMPMaximumThreads((int) resource_info.thread_limit);
+ if (resource_info.thread_limit > GetOpenMPMaximumThreads())
+ resource_info.thread_limit=GetOpenMPMaximumThreads();
break;
}
case TimeResource: