1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<title>resource - Set resource consumption limits</title>
5
<link rev="made" href="mailto:bfriesen@scooby.simplesystems.org" />
8
<body style="background-color: white">
10
<P><a name="__index__"></a></P>
15
<li><a href="#name">NAME</a></li>
16
<li><a href="#synopsis">SYNOPSIS</a></li>
17
<li><a href="#function_descriptions">FUNCTION DESCRIPTIONS</a></li>
20
<li><a href="#acquiremagickresource">AcquireMagickResource</a></li>
21
<li><a href="#getmagickresource">GetMagickResource</a></li>
22
<li><a href="#liberatemagickresource">LiberateMagickResource</a></li>
23
<li><a href="#listmagickresourceinfo">ListMagickResourceInfo</a></li>
24
<li><a href="#setmagickresourcelimit">SetMagickResourceLimit</a></li>
33
<h1><a name="name">NAME</a></h1>
34
<P>resource - Set resource consumption limits (e.g. memory)</P>
38
<h1><a name="synopsis">SYNOPSIS</a></h1>
39
<P>unsigned int <strong>AcquireMagickResource</strong>( const ResourceType type, const magick_int64_t size );</P>
40
<P>unsigned long <strong>GetMagickResource</strong>( const ResourceType type );</P>
41
<P>void <strong>LiberateMagickResource</strong>( const ResourceType type, const magick_int64_t size );</P>
42
<P>unsigned int <strong>ListMagickResourceInfo</strong>( FILE *file, ExceptionInfo *exception );</P>
43
<P>void <strong>SetMagickResourceLimit</strong>( const ResourceType type, const unsigned long limit );</P>
47
<h1><a name="function_descriptions">FUNCTION DESCRIPTIONS</a></h1>
50
<h2><a name="acquiremagickresource">AcquireMagickResource</a></h2>
51
<blockquote>AcquireMagickResource() acquires resources of the specified type. True is returned if the specified resource is available otherwise False. </blockquote><blockquote>The format of the AcquireMagickResource() method is: </blockquote><blockquote>unsigned int AcquireMagickResource ( const <A HREF="types.html#ResourceType">ResourceType</A> type, const magick_int64_t size ); </blockquote><P>A description of each parameter follows:</P>
53
<dt><strong><a name="item_o_type_3a">type:</a></strong><br />
59
<dt><strong><a name="item_o_size_3a">size:</a></strong><br />
62
The number of bytes needed from for this resource.
67
<h2><a name="getmagickresource">GetMagickResource</a></h2>
68
<blockquote>GetMagickResource() returns the the specified resource in megabytes. </blockquote><blockquote>The format of the GetMagickResource() method is: </blockquote><blockquote>unsigned long GetMagickResource ( const <A HREF="types.html#ResourceType">ResourceType</A> type ); </blockquote><P>A description of each parameter follows:</P>
70
<dt><strong>type:</strong><br />
78
<h2><a name="liberatemagickresource">LiberateMagickResource</a></h2>
79
<blockquote>LiberateMagickResource() liberates resources of the specified type. </blockquote><blockquote>The format of the LiberateMagickResource() method is: </blockquote><blockquote>void LiberateMagickResource ( const <A HREF="types.html#ResourceType">ResourceType</A> type, const magick_int64_t size ); </blockquote><P>A description of each parameter follows:</P>
81
<dt><strong>type:</strong><br />
87
<dt><strong>size:</strong><br />
90
The size of the resource.
95
<h2><a name="listmagickresourceinfo">ListMagickResourceInfo</a></h2>
96
<P>Method ListMagickResourceInfo lists the resource info to a file.</P>
97
<P>The format of the ListMagickResourceInfo method is:</P>
98
<blockquote>unsigned int ListMagickResourceInfo ( FILE *file, <A HREF="types.html#ExceptionInfo">ExceptionInfo</A> *exception ); </blockquote><P>A description of each parameter follows.</P>
100
<dt><strong><a name="item_o_file_3a">file:</a></strong><br />
103
An pointer to a FILE.
106
<dt><strong><a name="item_o_exception_3a">exception:</a></strong><br />
109
Return any errors or warnings in this structure.
114
<h2><a name="setmagickresourcelimit">SetMagickResourceLimit</a></h2>
115
<blockquote>SetMagickResourceLimit() sets the limit for a particular resource in megabytes. </blockquote><blockquote>The format of the SetMagickResourceLimit() method is: </blockquote><blockquote>void SetMagickResourceLimit ( const <A HREF="types.html#ResourceType">ResourceType</A> type, const unsigned long limit ); </blockquote><P>A description of each parameter follows:</P>
117
<dt><strong>type:</strong><br />
120
The type of resource.
123
<dt><strong><a name="item_o_limit_3a">limit:</a></strong><br />
126
The maximum limit for the resource.