# resource.c File Reference

`#include "magick/studio.h"`
`#include "magick/exception.h"`
`#include "magick/exception-private.h"`
`#include "magick/hashmap.h"`
`#include "magick/log.h"`
`#include "magick/image.h"`
`#include "magick/memory_.h"`
`#include "magick/option.h"`
`#include "magick/random_.h"`
`#include "magick/registry.h"`
`#include "magick/resource_.h"`
`#include "magick/semaphore.h"`
`#include "magick/signature.h"`
`#include "magick/string_.h"`
`#include "magick/splay-tree.h"`
`#include "magick/token.h"`
`#include "magick/utility.h"`

## Data Structures
struct | _ResourceInfo
## Defines
#define | O_NOFOLLOW 0
#define | TMP_MAX 238328
## Typedefs
typedef struct _ResourceInfo | ResourceInfo
## Functions
MagickExport MagickBooleanType | AcquireMagickResource (const ResourceType type, const MagickSizeType size)
MagickExport void | AsynchronousDestroyMagickResources (void)
static void * | DestroyTemporaryResources (void *temporary_resource)
static MagickBooleanType | GetPathTemplate (char *path)
MagickExport int | AcquireUniqueFileResource (char *path)
MagickExport void | DestroyMagickResources (void)
MagickExport MagickSizeType | GetMagickResource (const ResourceType type)
MagickExport MagickSizeType | GetMagickResourceLimit (const ResourceType type)
static unsigned long | MagickMax (const unsigned long x, const unsigned long y)
MagickExport void | InitializeMagickResources (void)
MagickExport MagickBooleanType | ListMagickResourceInfo (FILE *file, ExceptionInfo *magick_unused(exception))
MagickExport void | RelinquishMagickResource (const ResourceType type, const MagickSizeType size)
MagickExport MagickBooleanType | RelinquishUniqueFileResource (const char *path)
MagickExport MagickBooleanType | SetMagickResourceLimit (const ResourceType type, const MagickSizeType limit)
## Variables
static ResourceInfo | resource_info
static SemaphoreInfo * | resource_semaphore = (SemaphoreInfo *) NULL
static SplayTreeInfo * | temporary_resources = (SplayTreeInfo *) NULL

## Define Documentation

#define O_NOFOLLOW 0

#define TMP_MAX 238328

## Typedef Documentation

typedef struct _ResourceInfo ResourceInfo

## Function Documentation

MagickExport MagickBooleanType AcquireMagickResource | ( | const ResourceType | type,
|  | const MagickSizeType | size |
| ) |  |  |

MagickExport int AcquireUniqueFileResource | ( | char * | path | ) |

MagickExport void AsynchronousDestroyMagickResources | ( | void |  | ) |

MagickExport void DestroyMagickResources | ( | void |  | ) |

static void* DestroyTemporaryResources | ( | void * | temporary_resource | ) | `[static]`

MagickExport MagickSizeType GetMagickResource | ( | const ResourceType | type | ) |

MagickExport MagickSizeType GetMagickResourceLimit | ( | const ResourceType | type | ) |

static MagickBooleanType GetPathTemplate | ( | char * | path | ) | `[static]`

MagickExport void InitializeMagickResources | ( | void |  | ) |

MagickExport MagickBooleanType ListMagickResourceInfo | ( | FILE * | file,
|  | ExceptionInfo * | magick_unused(exception) |
| ) |  |  |

static unsigned long MagickMax | ( | const unsigned long | x,
|  | const unsigned long | y |
| ) |  |  | `[inline, static]`

MagickExport void RelinquishMagickResource | ( | const ResourceType | type,
|  | const MagickSizeType | size |
| ) |  |  |

MagickExport MagickBooleanType RelinquishUniqueFileResource | ( | const char * | path | ) |

MagickExport MagickBooleanType SetMagickResourceLimit | ( | const ResourceType | type,
|  | const MagickSizeType | limit |
| ) |  |  |

## Variable Documentation

ResourceInfo resource_info`[static]`

Initial value:

      {
        MagickULLConstant(0),
        MagickULLConstant(0),
        MagickULLConstant(0),
        MagickULLConstant(0),
        MagickULLConstant(0),
        MagickULLConstant(2048)*1024*1024,
        MagickULLConstant(1536)*1024*1024,
        MagickULLConstant(8192)*1024*1024,
        MagickResourceInfinity,
        MagickULLConstant(768)
      }

SemaphoreInfo* resource_semaphore = (SemaphoreInfo *) NULL`[static]`

SplayTreeInfo* temporary_resources = (SplayTreeInfo *) NULL`[static]`