MagickCore 7.1.0
Convert, Edit, Or Compose Bitmap Images
|
#include "MagickCore/studio.h"
#include "MagickCore/cache.h"
#include "MagickCore/cache-private.h"
#include "MagickCore/configure.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/linked-list.h"
#include "MagickCore/log.h"
#include "MagickCore/image.h"
#include "MagickCore/image-private.h"
#include "MagickCore/memory_.h"
#include "MagickCore/nt-base-private.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.
Data Structures | |
struct | _ResourceInfo |
Macros | |
#define | MagickPathTemplate "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" /* min 6 X's */ |
#define | NumberOfResourceTypes (sizeof(resource_semaphore)/sizeof(*resource_semaphore)) |
#define | O_NOFOLLOW 0 |
#define | TMP_MAX 238328 |
Typedefs | |
typedef struct _ResourceInfo | ResourceInfo |
Variables | |
static RandomInfo * | random_info = (RandomInfo *) NULL |
static ResourceInfo | resource_info |
static SemaphoreInfo * | resource_semaphore [] |
static SplayTreeInfo * | temporary_resources = (SplayTreeInfo *) NULL |
#define MagickPathTemplate "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" /* min 6 X's */ |
Definition at line 73 of file resource.c.
#define NumberOfResourceTypes (sizeof(resource_semaphore)/sizeof(*resource_semaphore)) |
Definition at line 74 of file resource.c.
#define O_NOFOLLOW 0 |
#define TMP_MAX 238328 |
typedef struct _ResourceInfo ResourceInfo |
MagickExport MagickBooleanType AcquireMagickResource | ( | const ResourceType | type, |
const MagickSizeType | size | ||
) |
Definition at line 188 of file resource.c.
References ActivateSemaphoreInfo(), _ResourceInfo::area, _ResourceInfo::area_limit, AreaResource, CommandOptionToMnemonic(), _ResourceInfo::disk, _ResourceInfo::disk_limit, DiskResource, _ResourceInfo::file, _ResourceInfo::file_limit, FileResource, FormatMagickSize(), GetLogEventMask(), GetMagickModule, _ResourceInfo::height, _ResourceInfo::height_limit, HeightResource, _ResourceInfo::list_length, _ResourceInfo::list_length_limit, ListLengthResource, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickFormatExtent, MagickResourceInfinity, MagickResourceOptions, MagickTrue, _ResourceInfo::map, _ResourceInfo::map_limit, MapResource, _ResourceInfo::memory, _ResourceInfo::memory_limit, MemoryResource, resource_info, resource_semaphore, ResourceEvent, _ResourceInfo::thread, _ResourceInfo::thread_limit, ThreadResource, _ResourceInfo::throttle, _ResourceInfo::throttle_limit, ThrottleResource, _ResourceInfo::time, _ResourceInfo::time_limit, TimeResource, UnlockSemaphoreInfo(), _ResourceInfo::width, _ResourceInfo::width_limit, and WidthResource.
Referenced by AcquireMatrixInfo(), CloneBlobInfo(), GetMultilineTypeMetrics(), OpenBlob(), OpenPixelCache(), OpenPixelCacheOnDisk(), PersistPixelCache(), SetBlobExtent(), and WaveletDenoiseImage().
MagickExport int AcquireUniqueFileResource | ( | char * | path | ) |
Definition at line 551 of file resource.c.
References AcquireRandomInfo(), ActivateSemaphoreInfo(), AddValueToSplayTree(), CompareSplayTreeString(), ConstantString(), DestroyStringInfo(), DestroyTemporaryResources(), FileResource, GetLogEventMask(), GetMagickModule, GetPathTemplate(), GetRandomKey(), GetStringInfoDatum(), GetStringInfoLength(), LockSemaphoreInfo(), LogMagickEvent(), MagickPathTemplate, NewSplayTree(), O_BINARY, O_NOFOLLOW, open_utf8(), random_info, resource_semaphore, ResourceEvent, S_MODE, temporary_resources, TMP_MAX, and UnlockSemaphoreInfo().
Referenced by AcquireMatrixInfo(), AcquireUniqueFilename(), AcquireUniqueSymbolicLink(), AcquireVirtualMemory(), BlobToFile(), CustomStreamToImage(), HoughLineImage(), ImagesToBlob(), ImagesToCustomStream(), ImageToBlob(), ImageToCustomStream(), ImageToFile(), InjectImageBlob(), OpenPixelCacheOnDisk(), PreviewImage(), and RenderPostscript().
MagickPrivate void AsynchronousResourceComponentTerminus | ( | void | ) |
Definition at line 417 of file resource.c.
References GetNextKeyInSplayTree(), ResetSplayTreeIterator(), ShredFile(), and temporary_resources.
|
static |
Definition at line 461 of file resource.c.
References DestroyString(), and ShredFile().
Referenced by AcquireUniqueFileResource().
MagickExport MagickSizeType GetMagickResource | ( | const ResourceType | type | ) |
Definition at line 676 of file resource.c.
References ActivateSemaphoreInfo(), _ResourceInfo::area, AreaResource, _ResourceInfo::disk, DiskResource, _ResourceInfo::file, FileResource, _ResourceInfo::height, HeightResource, _ResourceInfo::list_length, ListLengthResource, LockSemaphoreInfo(), _ResourceInfo::map, MapResource, _ResourceInfo::memory, MemoryResource, resource_info, resource_semaphore, _ResourceInfo::thread, ThreadResource, _ResourceInfo::throttle, ThrottleResource, _ResourceInfo::time, TimeResource, UnlockSemaphoreInfo(), _ResourceInfo::width, and WidthResource.
MagickExport MagickSizeType GetMagickResourceLimit | ( | const ResourceType | type | ) |
Definition at line 795 of file resource.c.
References ActivateSemaphoreInfo(), _ResourceInfo::area_limit, AreaResource, _ResourceInfo::disk_limit, DiskResource, _ResourceInfo::file_limit, FileResource, _ResourceInfo::height_limit, HeightResource, _ResourceInfo::list_length_limit, ListLengthResource, LockSemaphoreInfo(), _ResourceInfo::map_limit, MapResource, _ResourceInfo::memory_limit, MemoryResource, resource_info, resource_semaphore, _ResourceInfo::thread_limit, ThreadResource, _ResourceInfo::throttle_limit, ThrottleResource, _ResourceInfo::time_limit, TimeResource, UnlockSemaphoreInfo(), _ResourceInfo::width_limit, and WidthResource.
Referenced by AcquireContributionTLS(), AcquireFxInfoPrivate(), AcquireHistogramTLS(), AcquireKmeansTLS(), AcquirePixelCache(), AcquirePixelListTLS(), AcquirePixelTLS(), AcquirePolygonTLS(), AcquireQuantumPixels(), AcquireRandomInfoTLS(), AcquireResampleFilterTLS(), AcquireVirtualCacheView(), BilateralBlurImage(), DestroyContributionTLS(), DestroyFxInfo(), DestroyHistogramTLS(), DestroyKmeansTLS(), DestroyPixelListTLS(), DestroyPixelTLS(), DestroyPolygonTLS(), DestroyRandomInfoTLS(), DestroyResampleFilterTLS(), FxImage(), GetImageDepth(), GetImagePixelCache(), GetMagickNumberThreads(), KmeansImage(), and OpenPixelCache().
MagickExport MagickBooleanType GetPathTemplate | ( | char * | path | ) |
Definition at line 468 of file resource.c.
References AcquireExceptionInfo(), CloneString(), ConstantString(), DestroyExceptionInfo(), DestroyString(), DirectorySeparator, FormatLocaleString(), GetEnvironmentValue(), GetImageRegistry(), GetPathAttributes(), GetPolicyValue(), MagickFalse, MagickPathExtent, MagickPathTemplate, MagickTrue, S_ISDIR, and StringRegistryType.
Referenced by AcquireUniqueFileResource().
MagickExport MagickBooleanType ListMagickResourceInfo | ( | FILE * | file, |
ExceptionInfo * | magick_unusedexception | ||
) |
Definition at line 879 of file resource.c.
References ActivateSemaphoreInfo(), _ResourceInfo::area_limit, CopyMagickString(), _ResourceInfo::disk_limit, _ResourceInfo::file_limit, FileResource, FormatLocaleFile(), FormatLocaleString(), FormatMagickSize(), _ResourceInfo::height_limit, _ResourceInfo::list_length_limit, LockSemaphoreInfo(), magick_unreferenced, MagickFalse, MagickFormatExtent, MagickResourceInfinity, MagickTrue, _ResourceInfo::map_limit, _ResourceInfo::memory_limit, resource_info, resource_semaphore, _ResourceInfo::thread_limit, _ResourceInfo::throttle_limit, _ResourceInfo::time_limit, UnlockSemaphoreInfo(), and _ResourceInfo::width_limit.
MagickExport void RelinquishMagickResource | ( | const ResourceType | type, |
const MagickSizeType | size | ||
) |
Definition at line 966 of file resource.c.
References ActivateSemaphoreInfo(), CommandOptionToMnemonic(), _ResourceInfo::disk, _ResourceInfo::disk_limit, DiskResource, _ResourceInfo::file, _ResourceInfo::file_limit, FileResource, FormatMagickSize(), GetLogEventMask(), GetMagickModule, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickFormatExtent, MagickResourceOptions, MagickTrue, _ResourceInfo::map, _ResourceInfo::map_limit, MapResource, _ResourceInfo::memory, _ResourceInfo::memory_limit, MemoryResource, resource_info, resource_semaphore, ResourceEvent, _ResourceInfo::time, _ResourceInfo::time_limit, TimeResource, and UnlockSemaphoreInfo().
Referenced by AcquireMatrixInfo(), ClosePixelCacheOnDisk(), DestroyBlob(), DestroyMatrixInfo(), DetachBlob(), OpenBlob(), OpenPixelCache(), RelinquishPixelCachePixels(), and SetBlobExtent().
MagickExport MagickBooleanType RelinquishUniqueFileResource | ( | const char * | path | ) |
Definition at line 1100 of file resource.c.
References access_utf8(), ActivateSemaphoreInfo(), AppendImageFormat(), CopyMagickString(), DeleteNodeFromSplayTree(), FileResource, GetLogEventMask(), GetMagickModule, LockSemaphoreInfo(), LogMagickEvent(), MagickFalse, MagickPathExtent, resource_semaphore, ResourceEvent, ShredFile(), temporary_resources, and UnlockSemaphoreInfo().
Referenced by AcquireUniqueSymbolicLink(), AcquireVirtualMemory(), BlobToImage(), CustomStreamToImage(), DestroyMatrixInfo(), HoughLineImage(), ImagesToBlob(), ImagesToCustomStream(), ImageToBlob(), ImageToCustomStream(), InjectImageBlob(), InvokeDelegate(), PingBlob(), PreviewImage(), ReadImage(), RelinquishPixelCachePixels(), RelinquishVirtualMemory(), RenderPostscript(), SetImageInfo(), and WriteImage().
MagickPrivate MagickBooleanType ResourceComponentGenesis | ( | void | ) |
Definition at line 1146 of file resource.c.
References AcquireSemaphoreInfo(), AreaResource, DestroyString(), DiskResource, FileResource, GetEnvironmentValue(), GetMagickPageSize(), GetOpenMPMaximumThreads(), _ResourceInfo::height_limit, HeightResource, ListLengthResource, MagickMax, MagickResourceInfinity, MagickTrue, MapResource, MemoryResource, NumberOfResourceTypes, resource_info, resource_semaphore, SetMagickResourceLimit(), StringToMagickSizeType(), ThreadResource, ThrottleResource, TimeResource, _ResourceInfo::width_limit, and WidthResource.
Referenced by MagickCoreGenesis(), and SetMagickSecurityPolicy().
MagickPrivate void ResourceComponentTerminus | ( | void | ) |
Definition at line 1312 of file resource.c.
References AcquireSemaphoreInfo(), DestroyRandomInfo(), DestroySplayTree(), FileResource, LockSemaphoreInfo(), NumberOfResourceTypes, random_info, RelinquishSemaphoreInfo(), resource_semaphore, temporary_resources, and UnlockSemaphoreInfo().
Referenced by MagickCoreTerminus().
MagickExport MagickBooleanType SetMagickResourceLimit | ( | const ResourceType | type, |
const MagickSizeType | limit | ||
) |
Definition at line 1355 of file resource.c.
References ActivateSemaphoreInfo(), _ResourceInfo::area_limit, AreaResource, DestroyString(), _ResourceInfo::disk_limit, DiskResource, _ResourceInfo::file_limit, FileResource, GetOpenMPMaximumThreads(), GetPolicyValue(), _ResourceInfo::height_limit, HeightResource, _ResourceInfo::list_length_limit, ListLengthResource, LockSemaphoreInfo(), MAGICK_SSIZE_MAX, MagickFalse, MagickMax, MagickMin, MagickTrue, _ResourceInfo::map_limit, MapResource, _ResourceInfo::memory_limit, MemoryResource, ResetPixelCacheEpoch(), resource_info, resource_semaphore, StringToMagickSizeType(), _ResourceInfo::thread_limit, ThreadResource, _ResourceInfo::throttle_limit, ThrottleResource, _ResourceInfo::time_limit, TimeResource, UnlockSemaphoreInfo(), _ResourceInfo::width_limit, and WidthResource.
Referenced by ResourceComponentGenesis(), and SetMagickSecurityPolicyValue().
|
static |
Definition at line 113 of file resource.c.
Referenced by AcquireRandomInfo(), AcquireRandomInfoTLS(), AcquireUniqueFileResource(), AddNoiseImage(), ApplyEvaluateOperator(), DestroyRandomInfo(), DestroyRandomInfoTLS(), EvaluateImage(), EvaluateImages(), GenerateDifferentialNoise(), GenerateEntropicChaos(), GetPseudoRandomValue(), GetRandomInfoNormalize(), GetRandomInfoSeed(), GetRandomKey(), GetRandomSecretKey(), GetRandomValue(), KmeansImage(), PlasmaImage(), PlasmaImageProxy(), PlasmaPixel(), RandomThresholdImage(), RandomX(), RandomY(), ResourceComponentTerminus(), SetRandomKey(), ShredFile(), SketchImage(), and SpreadImage().
|
static |
Definition at line 116 of file resource.c.
Referenced by AcquireMagickResource(), GetMagickResource(), GetMagickResourceLimit(), ListMagickResourceInfo(), RelinquishMagickResource(), ResourceComponentGenesis(), and SetMagickResourceLimit().
|
static |
Definition at line 143 of file resource.c.
Referenced by AcquireMagickResource(), AcquireUniqueFileResource(), GetMagickResource(), GetMagickResourceLimit(), ListMagickResourceInfo(), RelinquishMagickResource(), RelinquishUniqueFileResource(), ResourceComponentGenesis(), ResourceComponentTerminus(), and SetMagickResourceLimit().
|
static |
Definition at line 159 of file resource.c.
Referenced by AcquireUniqueFileResource(), AsynchronousResourceComponentTerminus(), RelinquishUniqueFileResource(), and ResourceComponentTerminus().