MagickCore 7.0.10
resource.c File Reference
#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hashmap.h"
#include "wizard/log.h"
#include "wizard/memory_.h"
#include "wizard/option.h"
#include "wizard/random_.h"
#include "wizard/resource_.h"
#include "wizard/semaphore.h"
#include "wizard/signature.h"
#include "wizard/splay-tree.h"
#include "wizard/string_.h"
#include "wizard/string-private.h"
#include "wizard/token.h"
#include "wizard/utility.h"
#include "wizard/utility-private.h"
Include dependency graph for resource.c:

Go to the source code of this file.

Data Structures

struct  _ResourceInfo
 

Macros

#define WizardResourceInfinity   (~0UL)
 
#define O_NOFOLLOW   0
 
#define TMP_MAX   238328
 

Typedefs

typedef struct _ResourceInfo ResourceInfo
 

Functions

WizardExport WizardBooleanType AcquireUniqueFilename (char *path, ExceptionInfo *exception)
 
static void * DestroyTemporaryResources (void *temporary_resource)
 
WizardExport WizardBooleanType GetPathTemplate (const char *path, char *filename)
 
WizardExport int AcquireUniqueFileResource (const char *path, char *filename, ExceptionInfo *exception)
 
WizardExport WizardBooleanType AcquireWizardResource (const ResourceType type, const WizardSizeType size)
 
WizardExport void AsynchronousResourceComponentTerminus (void)
 
WizardExport WizardSizeType GetWizardResource (const ResourceType type)
 
WizardExport WizardSizeType GetWizardResourceLimit (const ResourceType type)
 
WizardExport WizardBooleanType ListWizardResourceInfo (FILE *file, ExceptionInfo *wizard_unused(exception))
 
WizardExport void RelinquishWizardResource (const ResourceType type, const WizardSizeType size)
 
WizardExport WizardBooleanType RelinquishUniqueFileResource (const char *path, const WizardBooleanType trash)
 
WizardExport WizardBooleanType ResourceComponentGenesis (void)
 
WizardExport void ResourceComponentTerminus (void)
 
WizardExport WizardBooleanType SetWizardResourceLimit (const ResourceType type, const WizardSizeType limit)
 

Variables

static RandomInforandom_info = (RandomInfo *) NULL
 
static ResourceInfo resource_info
 
static SemaphoreInforesource_semaphore = (SemaphoreInfo *) NULL
 
static SplayTreeInfotemporary_resources = (SplayTreeInfo *) NULL
 

Macro Definition Documentation

◆ O_NOFOLLOW

#define O_NOFOLLOW   0

◆ TMP_MAX

#define TMP_MAX   238328

◆ WizardResourceInfinity

#define WizardResourceInfinity   (~0UL)

Definition at line 63 of file resource.c.

Typedef Documentation

◆ ResourceInfo

typedef struct _ResourceInfo ResourceInfo

Function Documentation

◆ AcquireUniqueFilename()

WizardExport WizardBooleanType AcquireUniqueFilename ( char *  path,
ExceptionInfo exception 
)

◆ AcquireUniqueFileResource()

◆ AcquireWizardResource()

◆ AsynchronousResourceComponentTerminus()

WizardExport void AsynchronousResourceComponentTerminus ( void  )

◆ DestroyTemporaryResources()

static void * DestroyTemporaryResources ( void *  temporary_resource)
static

Definition at line 181 of file resource.c.

References DestroyString(), and remove_utf8().

Referenced by AcquireUniqueFileResource().

◆ GetPathTemplate()

◆ GetWizardResource()

◆ GetWizardResourceLimit()

◆ ListWizardResourceInfo()

◆ RelinquishUniqueFileResource()

◆ RelinquishWizardResource()

◆ ResourceComponentGenesis()

◆ ResourceComponentTerminus()

◆ SetWizardResourceLimit()

Variable Documentation

◆ random_info

◆ resource_info

ResourceInfo resource_info
static
Initial value:
=
{
WizardULLConstant(1536)*1024*1024/sizeof(void *),
WizardULLConstant(1536)*1024*1024,
WizardULLConstant(3072)*1024*1024,
}
#define WizardResourceInfinity
Definition resource.c:63
#define WizardULLConstant(c)
Definition wizard-type.h:36

Definition at line 92 of file resource.c.

Referenced by AcquireWizardResource(), GetWizardResource(), GetWizardResourceLimit(), ListWizardResourceInfo(), RelinquishWizardResource(), and SetWizardResourceLimit().

◆ resource_semaphore

◆ temporary_resources