Magick++: ResourceLimits.h Source File

Magick++ 7.1.0

ResourceLimits.h
Go to the documentation of this file.
1 // This may look like C code, but it is really -*- C++ -*-
2 //
3 // Copyright @ 2014 ImageMagick Studio LLC, a non-profit organization
4 // dedicated to making software imaging solutions freely available.
5 //
6 // Definition of resource limits.
7 //
8
9 #if !defined(Magick_ResourceLimits_header)
10 #define Magick_ResourceLimits_header
11
12 #include "Magick++/Include.h"
13
14 namespace Magick
15 {
16 class MagickPPExport ResourceLimits
17 {
18 public:
19
20 // Pixel cache limit in bytes. Requests for memory above this limit
21 // are automagically allocated on disk.
22 static void area(const MagickSizeType limit_);
23 static MagickSizeType area(void);
24
25 // Pixel cache limit in bytes. Requests for memory above this limit
26 // will fail.
27 static void disk(const MagickSizeType limit_);
28 static MagickSizeType disk(void);
29
30 // The maximum number of open pixel cache files. When this limit is
31 // exceeded, any subsequent pixels cached to disk are closed and reopened
32 // on demand. This behavior permits a large number of images to be accessed
33 // simultaneously on disk, but with a speed penalty due to repeated
34 // open/close calls.
35 static void file(const MagickSizeType limit_);
36 static MagickSizeType file(void);
37
38 // The maximum height of an image.
39 static void height(const MagickSizeType limit_);
40 static MagickSizeType height(void);
41
42 // The maximum number of images in an image list.
43 static void listLength(const MagickSizeType limit_);
44 static MagickSizeType listLength();
45
46 // Pixel cache limit in bytes. Once this memory limit is exceeded,
47 // all subsequent pixels cache operations are to/from disk.
48 static void map(const MagickSizeType limit_);
49 static MagickSizeType map(void);
50
51 // Pixel cache limit in bytes. Once this memory limit is exceeded,
52 // all subsequent pixels cache operations are to/from disk or to/from
53 // memory mapped files.
54 static void memory(const MagickSizeType limit_);
55 static MagickSizeType memory(void);
56
57 // Limits the number of threads used in multithreaded operations.
58 static void thread(const MagickSizeType limit_);
59 static MagickSizeType thread(void);
60
61 // Periodically yield the CPU for at least the time specified in
62 // milliseconds.
63 static void throttle(const MagickSizeType limit_);
64 static MagickSizeType throttle(void);
65
66 // The maximum width of an image.
67 static void width(const MagickSizeType limit_);
68 static MagickSizeType width(void);
69
70 private:
71 ResourceLimits(void);
72
73 }; // class ResourceLimits
74
75 } // Magick namespace
76
77 #endif // Magick_ResourceLimits_header
MagickPPExport
#define MagickPPExport
Definition: Include.h:297
Include.h
Magick::ResourceLimits
Definition: ResourceLimits.h:16
Magick
Definition: Blob.h:17