|
MagickCore
6.7.5
|
#include "MagickCore/studio.h"#include "MagickCore/cache.h"#include "MagickCore/configure.h"#include "MagickCore/exception.h"#include "MagickCore/exception-private.h"#include "MagickCore/hashmap.h"#include "MagickCore/log.h"#include "MagickCore/image.h"#include "MagickCore/memory_.h"#include "MagickCore/option.h"#include "MagickCore/policy.h"#include "MagickCore/random_.h"#include "MagickCore/registry.h"#include "MagickCore/resource_.h"#include "MagickCore/resource-private.h"#include "MagickCore/semaphore.h"#include "MagickCore/signature-private.h"#include "MagickCore/string_.h"#include "MagickCore/string-private.h"#include "MagickCore/splay-tree.h"#include "MagickCore/thread-private.h"#include "MagickCore/token.h"#include "MagickCore/utility.h"#include "MagickCore/utility-private.h"
Go to the source code of this file.
| #define O_NOFOLLOW 0 |
Referenced by AcquireUniqueFileResource().
| #define TMP_MAX 238328 |
Referenced by AcquireUniqueFileResource().
| typedef struct _ResourceInfo ResourceInfo |
| MagickExport MagickBooleanType AcquireMagickResource | ( | const ResourceType | type, |
| const MagickSizeType | size | ||
| ) |
Definition at line 149 of file resource.c.
References MaxTextExtent, MagickFalse, FormatMagickSize(), resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), AreaResource, resource_info, _ResourceInfo::area, _ResourceInfo::area_limit, MagickResourceInfinity, MagickTrue, MemoryResource, _ResourceInfo::memory, _ResourceInfo::memory_limit, MapResource, _ResourceInfo::map, _ResourceInfo::map_limit, DiskResource, _ResourceInfo::disk, _ResourceInfo::disk_limit, FileResource, _ResourceInfo::file, _ResourceInfo::file_limit, ThreadResource, _ResourceInfo::thread, _ResourceInfo::thread_limit, TimeResource, _ResourceInfo::time, _ResourceInfo::time_limit, UnlockSemaphoreInfo(), LogMagickEvent(), ResourceEvent, GetMagickModule, CommandOptionToMnemonic(), and MagickResourceOptions.
Referenced by OpenPixelCacheOnDisk(), OpenPixelCache(), and AcquireRadonInfo().
| MagickExport int AcquireUniqueFileResource | ( | char * | path | ) |
Definition at line 411 of file resource.c.
References LogMagickEvent(), ResourceEvent, GetMagickModule, random_info, AcquireRandomInfo(), TMP_MAX, GetPathTemplate(), GetRandomKey(), GetStringInfoDatum(), GetStringInfoLength(), DestroyStringInfo(), O_BINARY, open_utf8(), O_NOFOLLOW, S_MODE, resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), temporary_resources, NewSplayTree(), CompareSplayTreeString(), DestroyTemporaryResources(), UnlockSemaphoreInfo(), AddValueToSplayTree(), and ConstantString().
Referenced by RenderPostscript(), BlobToFile(), ImageToBlob(), ImageToFile(), ImagesToBlob(), InjectImageBlob(), OpenPixelCacheOnDisk(), PreviewImage(), AcquireRadonInfo(), AcquireUniqueFilename(), and AcquireUniqueSymbolicLink().
| MagickPrivate void AsynchronousResourceComponentTerminus | ( | void | ) |
Definition at line 290 of file resource.c.
References temporary_resources, ResetSplayTreeIterator(), GetNextKeyInSplayTree(), and remove_utf8().
| static void* DestroyTemporaryResources | ( | void * | temporary_resource | ) | [static] |
Definition at line 334 of file resource.c.
References remove_utf8(), and DestroyString().
Referenced by AcquireUniqueFileResource().
| MagickExport MagickSizeType GetMagickResource | ( | const ResourceType | type | ) |
Definition at line 518 of file resource.c.
References LockSemaphoreInfo(), resource_semaphore, AreaResource, resource_info, _ResourceInfo::area, MemoryResource, _ResourceInfo::memory, MapResource, _ResourceInfo::map, DiskResource, _ResourceInfo::disk, FileResource, _ResourceInfo::file, ThreadResource, _ResourceInfo::thread, TimeResource, _ResourceInfo::time, and UnlockSemaphoreInfo().
| MagickExport MagickSizeType GetMagickResourceLimit | ( | const ResourceType | type | ) |
Definition at line 591 of file resource.c.
References resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), AreaResource, resource_info, _ResourceInfo::area_limit, MemoryResource, _ResourceInfo::memory_limit, MapResource, _ResourceInfo::map_limit, DiskResource, _ResourceInfo::disk_limit, FileResource, _ResourceInfo::file_limit, ThreadResource, _ResourceInfo::thread_limit, TimeResource, _ResourceInfo::time_limit, and UnlockSemaphoreInfo().
Referenced by GetImagePixelCache().
| static MagickBooleanType GetPathTemplate | ( | char * | path | ) | [static] |
Definition at line 341 of file resource.c.
References CopyMagickString(), MaxTextExtent, AcquireExceptionInfo(), GetImageRegistry(), StringRegistryType, DestroyExceptionInfo(), GetEnvironmentValue(), GetPolicyValue(), ConstantString(), MagickTrue, DestroyString(), GetPathAttributes(), MagickFalse, S_ISDIR, DirectorySeparator, and FormatLocaleString().
Referenced by AcquireUniqueFileResource().
| MagickExport MagickBooleanType ListMagickResourceInfo | ( | FILE * | file, |
| ExceptionInfo * | magick_unusedexception | ||
| ) |
Definition at line 669 of file resource.c.
References MaxTextExtent, resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), FormatMagickSize(), resource_info, _ResourceInfo::area_limit, MagickFalse, _ResourceInfo::memory_limit, MagickTrue, _ResourceInfo::map_limit, CopyMagickString(), _ResourceInfo::disk_limit, MagickResourceInfinity, _ResourceInfo::time_limit, FormatLocaleString(), FormatLocaleFile(), _ResourceInfo::file_limit, _ResourceInfo::thread_limit, and UnlockSemaphoreInfo().
| static size_t MagickMax | ( | const size_t | x, |
| const size_t | y | ||
| ) | [inline, static] |
Definition at line 889 of file resource.c.
Referenced by ResourceComponentGenesis().
| static MagickSizeType MagickMin | ( | const MagickSizeType | x, |
| const MagickSizeType | y | ||
| ) | [inline, static] |
Definition at line 1081 of file resource.c.
Referenced by SetMagickResourceLimit().
| MagickExport void RelinquishMagickResource | ( | const ResourceType | type, |
| const MagickSizeType | size | ||
| ) |
Definition at line 733 of file resource.c.
References MaxTextExtent, FormatMagickSize(), MagickFalse, resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), AreaResource, resource_info, _ResourceInfo::area, _ResourceInfo::area_limit, MemoryResource, _ResourceInfo::memory, MagickTrue, _ResourceInfo::memory_limit, MapResource, _ResourceInfo::map, _ResourceInfo::map_limit, DiskResource, _ResourceInfo::disk, _ResourceInfo::disk_limit, FileResource, _ResourceInfo::file, _ResourceInfo::file_limit, ThreadResource, _ResourceInfo::thread, _ResourceInfo::thread_limit, TimeResource, _ResourceInfo::time, _ResourceInfo::time_limit, UnlockSemaphoreInfo(), LogMagickEvent(), ResourceEvent, GetMagickModule, CommandOptionToMnemonic(), and MagickResourceOptions.
Referenced by ClosePixelCacheOnDisk(), RelinquishPixelCachePixels(), OpenPixelCache(), DestroyRadonInfo(), and AcquireRadonInfo().
| MagickExport MagickBooleanType RelinquishUniqueFileResource | ( | const char * | path | ) |
Definition at line 841 of file resource.c.
References MaxTextExtent, LogMagickEvent(), ResourceEvent, GetMagickModule, temporary_resources, ResetSplayTreeIterator(), GetNextKeyInSplayTree(), LocaleCompare(), DeleteNodeFromSplayTree(), CopyMagickString(), AppendImageFormat(), remove_utf8(), MagickTrue, and MagickFalse.
Referenced by RenderPostscript(), BlobToImage(), ImageToBlob(), ImagesToBlob(), InjectImageBlob(), DestroyPixelCache(), ReadImage(), WriteImage(), InvokeDelegate(), PreviewImage(), DestroyRadonInfo(), and AcquireUniqueSymbolicLink().
| MagickPrivate MagickBooleanType ResourceComponentGenesis | ( | void | ) |
Definition at line 908 of file resource.c.
References AcquireSemaphoreInfo(), resource_semaphore, GetMagickPageSize(), SetMagickResourceLimit(), AreaResource, MemoryResource, MapResource, GetEnvironmentValue(), GetPolicyValue(), StringToSizeType(), DestroyString(), DiskResource, FileResource, MagickMax(), ThreadResource, GetOpenMPMaximumThreads(), TimeResource, and MagickTrue.
Referenced by MagickCoreGenesis().
| MagickPrivate void ResourceComponentTerminus | ( | void | ) |
Definition at line 1042 of file resource.c.
References resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), temporary_resources, DestroySplayTree(), random_info, DestroyRandomInfo(), UnlockSemaphoreInfo(), and DestroySemaphoreInfo().
Referenced by MagickCoreTerminus().
| MagickExport MagickBooleanType SetMagickResourceLimit | ( | const ResourceType | type, |
| const MagickSizeType | limit | ||
| ) |
Definition at line 1089 of file resource.c.
References resource_semaphore, AcquireSemaphoreInfo(), LockSemaphoreInfo(), AreaResource, resource_info, _ResourceInfo::area_limit, GetPolicyValue(), MagickMin(), StringToSizeType(), MemoryResource, _ResourceInfo::memory_limit, MapResource, _ResourceInfo::map_limit, DiskResource, _ResourceInfo::disk_limit, FileResource, _ResourceInfo::file_limit, ThreadResource, _ResourceInfo::thread_limit, SetOpenMPMaximumThreads(), TimeResource, _ResourceInfo::time_limit, DestroyString(), UnlockSemaphoreInfo(), and MagickTrue.
Referenced by ResourceComponentGenesis().
| static MagickSizeType StringToSizeType | ( | const char * | string, |
| const double | interval | ||
| ) | [inline, static] |
Definition at line 896 of file resource.c.
References SiPrefixToDoubleInterval(), and MagickULLConstant.
Referenced by ResourceComponentGenesis(), and SetMagickResourceLimit().
RandomInfo* random_info = (RandomInfo *) NULL [static] |
Definition at line 95 of file resource.c.
Referenced by SpreadImage(), AddNoiseImage(), PlasmaImage(), SketchImage(), AcquireRandomInfoThreadSet(), AcquireRandomInfo(), AcquireUniqueFileResource(), ResourceComponentTerminus(), EvaluateImages(), EvaluateImage(), and RandomThresholdImage().
ResourceInfo resource_info [static] |
{
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(3072)*1024*1024,
MagickULLConstant(1536)*1024*1024,
MagickULLConstant(3072)*1024*1024,
MagickResourceInfinity,
MagickULLConstant(768),
MagickULLConstant(4),
MagickResourceInfinity
}
Definition at line 98 of file resource.c.
Referenced by AcquireMagickResource(), GetMagickResource(), GetMagickResourceLimit(), ListMagickResourceInfo(), RelinquishMagickResource(), and SetMagickResourceLimit().
SemaphoreInfo* resource_semaphore = (SemaphoreInfo *) NULL [static] |
Definition at line 117 of file resource.c.
Referenced by AcquireMagickResource(), AcquireUniqueFileResource(), GetMagickResource(), GetMagickResourceLimit(), ListMagickResourceInfo(), RelinquishMagickResource(), ResourceComponentGenesis(), ResourceComponentTerminus(), and SetMagickResourceLimit().
SplayTreeInfo* temporary_resources = (SplayTreeInfo *) NULL [static] |
Definition at line 120 of file resource.c.
Referenced by AsynchronousResourceComponentTerminus(), AcquireUniqueFileResource(), RelinquishUniqueFileResource(), and ResourceComponentTerminus().