blob: 6d1c1bda358402d24d11d5b03432a3eb230a9be6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.2: http://docutils.sourceforge.net/" />
<title>resource</title>
<link rel="stylesheet" href="../docutils-api.css" type="text/css" />
</head>
<body>
<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
<input type="hidden" name="domains" value="www.graphicsmagick.org" />
<input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" /> <input type="submit" name="sa" value="Search" /></span>
</form>
</div>
<div class="navmenu">
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../project.html">Project</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../README.html">Install</a></li>
<li><a href="../Hg.html">Source</a></li>
<li><a href="../NEWS.html">News</a> </li>
<li><a href="../utilities.html">Utilities</a></li>
<li><a href="../programming.html">Programming</a></li>
<li><a href="../reference.html">Reference</a></li>
</ul>
</div>
<div class="document" id="resource">
<h1 class="title">resource</h1>
<h2 class="subtitle" id="set-resource-consumption-limits-e-g-memory">Set resource consumption limits (e.g. memory)</h2>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#acquiremagickresource" id="id11">AcquireMagickResource</a></li>
<li><a class="reference internal" href="#getmagickresource" id="id12">GetMagickResource</a></li>
<li><a class="reference internal" href="#getmagickresourcelimit" id="id13">GetMagickResourceLimit</a></li>
<li><a class="reference internal" href="#liberatemagickresource" id="id14">LiberateMagickResource</a></li>
<li><a class="reference internal" href="#listmagickresourceinfo" id="id15">ListMagickResourceInfo</a></li>
<li><a class="reference internal" href="#setmagickresourcelimit" id="id16">SetMagickResourceLimit</a></li>
</ul>
</div>
<div class="section" id="acquiremagickresource">
<h1><a class="toc-backref" href="#id11">AcquireMagickResource</a></h1>
<div class="section" id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">
MagickPassFail AcquireMagickResource( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type, const magick_int64_t size );
</pre>
</div>
<div class="section" id="description">
<h2>Description</h2>
<p>AcquireMagickResource() acquires resources of the specified type. True is
returned if the specified resource is available otherwise False.</p>
<p>The format of the AcquireMagickResource() method is:</p>
<pre class="literal-block">
MagickPassFail AcquireMagickResource( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type, const magick_int64_t size );
</pre>
<dl class="docutils">
<dt>type:</dt>
<dd>The type of resource.</dd>
<dt>size:</dt>
<dd>The number of bytes needed from for this resource.</dd>
</dl>
</div>
</div>
<div class="section" id="getmagickresource">
<h1><a class="toc-backref" href="#id12">GetMagickResource</a></h1>
<div class="section" id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">
magick_uint64_t GetMagickResource( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type );
</pre>
</div>
<div class="section" id="id2">
<h2>Description</h2>
<p>GetMagickResource() returns the current consumption level for the
specified resource type.</p>
<p>The format of the GetMagickResource() method is:</p>
<pre class="literal-block">
magick_uint64_t GetMagickResource( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type );
</pre>
<p>A description of each parameter follows:</p>
<dl class="docutils">
<dt>type:</dt>
<dd>The type of resource.</dd>
</dl>
</div>
</div>
<div class="section" id="getmagickresourcelimit">
<h1><a class="toc-backref" href="#id13">GetMagickResourceLimit</a></h1>
<div class="section" id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">
magick_int64_t GetMagickResourceLimit( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type );
</pre>
</div>
<div class="section" id="id4">
<h2>Description</h2>
<p>GetMagickResourceLimit() returns the current maximum limit for the
specified resource type. Returns a maximum 64-bit integer value if
the resource has not been limited.</p>
<p>The format of the GetMagickResourceLimit() method is:</p>
<pre class="literal-block">
magick_int64_t GetMagickResourceLimit( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type );
</pre>
<p>A description of each parameter follows:</p>
<dl class="docutils">
<dt>type:</dt>
<dd>The type of resource.</dd>
</dl>
</div>
</div>
<div class="section" id="liberatemagickresource">
<h1><a class="toc-backref" href="#id14">LiberateMagickResource</a></h1>
<div class="section" id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">
void LiberateMagickResource( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type, const magick_int64_t size );
</pre>
</div>
<div class="section" id="id6">
<h2>Description</h2>
<p>LiberateMagickResource() liberates resources of the specified type.</p>
<p>The format of the LiberateMagickResource() method is:</p>
<pre class="literal-block">
void LiberateMagickResource( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type, const magick_int64_t size );
</pre>
<dl class="docutils">
<dt>type:</dt>
<dd>The type of resource.</dd>
<dt>size:</dt>
<dd>The size of the resource.</dd>
</dl>
</div>
</div>
<div class="section" id="listmagickresourceinfo">
<h1><a class="toc-backref" href="#id15">ListMagickResourceInfo</a></h1>
<div class="section" id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">
unsigned int ListMagickResourceInfo( FILE *file, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );
</pre>
</div>
<div class="section" id="id8">
<h2>Description</h2>
<p>Method ListMagickResourceInfo lists the resource info to a file.</p>
<p>The format of the ListMagickResourceInfo method is:</p>
<pre class="literal-block">
unsigned int ListMagickResourceInfo( FILE *file, <a class="reference external" href="../api/types.html#exceptioninfo">ExceptionInfo</a> *exception );
</pre>
<p>A description of each parameter follows.</p>
<dl class="docutils">
<dt>file:</dt>
<dd>An pointer to a FILE.</dd>
<dt>exception:</dt>
<dd>Return any errors or warnings in this structure.</dd>
</dl>
</div>
</div>
<div class="section" id="setmagickresourcelimit">
<h1><a class="toc-backref" href="#id16">SetMagickResourceLimit</a></h1>
<div class="section" id="id9">
<h2>Synopsis</h2>
<pre class="literal-block">
void SetMagickResourceLimit( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type, const unsigned long limit );
</pre>
</div>
<div class="section" id="id10">
<h2>Description</h2>
<p>SetMagickResourceLimit() sets the limit for a particular resource. The
units for resource types are as follows:</p>
<p>DiskResource -- Bytes
FileResource -- Open files
MapResource -- Bytes
MemoryResource -- Bytes
PixelsResource -- Pixels
ThreadsResource -- Threads
WidthResource -- Pixels
HeightResource -- Pixels</p>
<p>The format of the SetMagickResourceLimit() method is:</p>
<pre class="literal-block">
void SetMagickResourceLimit( const <a class="reference external" href="../api/types.html#resourcetype">ResourceType</a> type, const unsigned long limit );
</pre>
<dl class="docutils">
<dt>type:</dt>
<dd>The type of resource.</dd>
<dt>limit:</dt>
<dd>The maximum limit for the resource.</dd>
</dl>
</div>
</div>
</div>
<hr class="docutils">
<div class="document">
<p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002 - 2020<!--SPONSOR_LOGO--></p>
</div>
</body>
</html>
|